-1

So, I've been working in node.js and react native before in Windows 10 without any issues. But ever since I started using this new laptop, with windows 11 in it, I get these annoying errors. Doing npm install -g npm@8.3.1 gave me the following result enter image description here

so I did npm audit fix as suggested, on which I was greeted with this:

enter image description here

and so I did npm i --package-lock-only, again, as suggested. Which got me: enter image description here

IDK what I'm doing wrong. I don't know how it'll affect me. Can someone help me understand this? Thanks!

2 Answers2

1

You can see from the path in your final screenshot that npm is trying to edit your package-lock.json file in the C:\WINDOWS\System32 directory and does not have permission to do that.

You can refer to this answer on how to update your npm configuration to use a folder that you do have permissions to write to.

Tom
  • 2,734
  • 2
  • 22
  • 39
1

You have no problem executing React-native even if you do not perform the npm audit fix command

Also, you are not in the right position to do the command. The command must be executed in your project folder.

hong developer
  • 13,291
  • 4
  • 38
  • 68