on running npx expo start: Error: Cannot parse package.json as JSON, unexpected end of JSON input

Running with vscode m1 mac, I get this error when i try to start the development server:
Failed to construct transformer: Error: Cannot parse /Users/arnavchowdhry/Downloads/Facebook-main/.nvm/test/fast/Unit tests/mocks/project_dirs/nested-both/package.json as JSON: Unexpected end of JSON input
at Object.worker (/Users/arnavchowdhry/Downloads/Facebook-main/node_modules/jest-haste-map/build/worker.js:146:13)
at execFunction (/Users/arnavchowdhry/Downloads/Facebook-main/node_modules/jest-worker/build/workers/processChild.js:137:17)
at execHelper (/Users/arnavchowdhry/Downloads/Facebook-main/node_modules/jest-worker/build/workers/processChild.js:116:5)
at execMethod (/Users/arnavchowdhry/Downloads/Facebook-main/node_modules/jest-worker/build/workers/processChild.js:120:5)
at process.messageListener (/Users/arnavchowdhry/Downloads/Facebook-main/node_modules/jest-worker/build/workers/processChild.js:38:7)
at process.emit (node:events:513:28)
at emit (node:internal/child_process:939:14)
at processTicksAndRejections (node:internal/process/task_queues:84:21) {
type: ‘Error’
Been at this for days, cant seem to find any solution

Hi @arnav_123,

It could be that your machine might be using an older version of npm. Can you run the command: npx expo-env-info and share the output here.

Sorry to bother you, i ultimately just realized i screwed up my environment by pasting random stack overflow commands, so I moved all the files to a new project. Thanks for your time though

1 Like

No worries! Glad you got it resolved on your end.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.