Ryan Fay
Ryan Fay

Reputation: 1

Error running npm start for expo app I think it is due to sudo

I am trying to run my application but I can only run it while using "sudo npm start," which I think is affecting the build of my app in expo. I believe my problem will go away when I am able to run "npm start," but as of now, when I run this I get the following error:

> @ start /Users/ryanfay/csc308outdoors
> expo start

Uncaught Error [Error: EACCES: permission denied, open '/Users/ryanfay/.expo/state.json.725563943'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'open',
  path: '/Users/ryanfay/.expo/state.json.725563943'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ start: `expo start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ryanfay/.npm/_logs/2020-05-20T02_01_41_168Z-debug.log

Upvotes: 0

Views: 716

Answers (1)

Rom Grk
Rom Grk

Reputation: 536

The file the app is trying to use probably belong to another user. It can happen if at some point you ran sudo npm start, then any file created will belong to the root user.

You can change ownership back to your user with sudo chown -R ryanfay /Users/ryanfay/.expo.

Upvotes: 1

Related Questions