getting a JSON error when i deploy but on local is working

VM127:1 Uncaught (in promise) SyntaxError: Unexpected token ‘<’, "<!doctype "… is not valid JSON

The view you’re calling is returning HTML instead of JSON. There could be many reasons why.
Examine the full response in your browser’s developer tools to see what is being returned.