79414889

Date: 2025-02-05 13:23:15
Score: 1.5
Natty:
Report link

As @slebetman have mentioned in the comments you've probably ran npm install with sudo or root privileges, leading to the package-lock.json file being owned by root.

Since the other answers are based on Docker, I'd thought I'd give the Linux/Unix solution for people who are in my situation running their locally. Run the command:

sudo chown NAME-OF-YOUR-USER package-lock.json

The command will change the owner of the file resolving the permission conflict you're experiencing.

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @slebetman
  • Low reputation (1):
Posted by: Anas