Closed CalliEliza closed 9 years ago
What operating system are you using? If you're using Mac/Linux, the you might have run npm init
using sudo
. That would have made the superuser the owner of the package.json
file.
You can check this by running ls -al
in the same directory as the package.json
file. If this is the problem, then you'll see a line that says something like this:
-rw-r--r-- 1 root staff 570 May 24 12:36 package.json
If this is the problem, then running the following command should fix it:
sudo chown `whoami` package.json
I am running Linux. Thanks for you help. It was a sudo problem. That fixed it.
Glad to hear it worked :)
When I try to update the package.json file to include my test.js I get the error:
ERR: Error: EACCES
It seems that for some reason I do not have access to change the json file.