zeit

JSON.parse: unexpected character at line 1 column 1 of the JSON data when runing nextjs

为君一笑 提交于 2020-06-17 13:27:37
问题 My project suddenly start to give the following error, when accessing any page: JSON.parse: unexpected character at line 1 column 1 of the JSON data After rebuild the project from scratch i found out that the cause is the node path set on dev command, like this: //package.json file "NODE_PATH=. next" This is a common solution describe here to enable use of absolute paths on imports, for nextjs projects with typescript enable. To reproduce, follow the steps: run npm init next-app to create an