Help! I can't run any Exp Development CLI commands, keep getting this error

#1

Uncaught Error { JsonFileError: Error parsing JSON file: /Users/Karthik/.expo/state.json └─ Cause: SyntaxError: Unexpected string in JSON at position 157 at fsp.readFile.then.json (/usr/local/lib/node_modules/exp/node_modules/@expo/json-file/JsonFile.js:77:15) name: 'JsonFileError', cause: SyntaxError: Unexpected string in JSON at position 157 at JSON.parse (<anonymous>) at fsp.readFile.then.json (/usr/local/lib/node_modules/exp/node_modules/@expo/json-file/JsonFile.js:72:21), isJsonFileError: true }

I suspect it might be because I stopped the packager while it was reloading the project?

#2

Ok so I deleted state.json like this rm -f /Users/Karthik/.expo/state.json

Now I can run exp commands, but when I do exp start I get this,

exp] Making sure project is set up correctly…
|[exp] Error: Can’t find package.json
/[exp] There is an error with your project. See above logs for information.
[exp] Set EXPO_DEBUG=true in your env to view the stack trace.

#3

Can't find package.json – are you sure you’re running exp start in the correct directory that contains your project?

2 Likes