0

When I type npm start into the terminal in VS Code, this is the result:

PS C:\Windows\System32\FirstApp> npm start

> @ start C:\Windows\System32\FirstApp
> expo start

EPERM: operation not permitted, open 'C:\Windows\System32\FirstApp\.expo\settings.json.1281830730'
Error: EPERM: operation not permitted, open 'C:\Windows\System32\FirstApp\.expo\settings.json.1281830730'
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!     C:\Users\hatfi\AppData\Roaming\npm-cache\_logs\2021-09-07T14_06_40_219Z-debug.log

I've looked around on the internet and I have no idea how to fix it, any other fix I try seems not to work, except uninstalling and reinstalling node.js, but I've already done that and this will just happen again the next time I shut down my PC.

  • Does this answer your question? [npm - EPERM: operation not permitted on Windows](https://stackoverflow.com/questions/34600932/npm-eperm-operation-not-permitted-on-windows) – Yana Trifonova Sep 07 '21 at 14:15

2 Answers2

0

To write file in the System32 folder you need the Administrator permissions. So or you run the shell "as administrator", or better you change the directory of your app.
It makes no sense to create a project in that directory.

Michele Viviani
  • 175
  • 1
  • 7
0

Please don't use system32 folder

system32 folder is the system folder Windows uses. You really really shouldn't use that folder for anything. If you break anything in that folder your system can easily be malfunctioning and you will have to repair your system.

The reason you are getting the error is, well, it is your system folder that Windows discourages users to use and puts an "admin check" for writing operations into it.

You can create a folder named Projects in your Documents folder maybe and then use that folder for your future projects.

Hope the answer is clear.