Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(SyntaxError): Unexpected token < in JSON at position 0 #4

Open
davidfufu opened this issue Apr 28, 2018 · 1 comment
Open

(SyntaxError): Unexpected token < in JSON at position 0 #4

davidfufu opened this issue Apr 28, 2018 · 1 comment

Comments

@davidfufu
Copy link

I git cloned the repo, ran the install scripts for the client and the server, and ran "npm run dev", but got the above error.

npm v 6.0.0
node v9.9.0

@gkennedy87
Copy link
Contributor

gkennedy87 commented Dec 1, 2020

Try adding cors to your server.js file.

npm i cors

// in server.js
const cors = require('cors');

// alter the following app.get() params in server.js
app.get('/api/customers', cors() , (req,res,next) => { ... })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants