I run npm install lodash but it throws Error: EACCES: permission denied error. I know it is permission issue but as far as I know, sudo permission
First install without -g (global) on root. After try using -g (global) It worked for me.
Execute these commands and issue will be solved!
sudo chmod -R 777 /usr/local/bin
sudo chmod -R 777 /usr/local/lib/node_modules
LUBUNTU 19.10 / Same issue running: $ npm start
dump: Error: EACCES: permission denied, open '/home/simon/xxx/pagebuilder/resources/scripts/registration/node_modules/.cache/@babel/register/.babel.7.4.0.development.json' at Object.fs.openSync (fs.js:646:18) at Object.fs.writeFileSync (fs.js:1299:33) at save (/home/simon/xxx/pagebuilder/resources/scripts/registration/node_modules/@babel/register/lib/cache.js:52:15) at _combinedTickCallback (internal/process/next_tick.js:132:7) at process._tickCallback (internal/process/next_tick.js:181:9) at Function.Module.runMain (module.js:696:11) at Object. (/home/simon/xxxx/pagebuilder/resources/scripts/registration/node_modules/@babel/node/lib/_babel-node.js:234:23) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32)
Looks like my default user (administrator) didn't have rights on node-module directories.
This fixed it for me!
$ sudo chmod a+w node_modules -R ## from project root
On Windows it ended up being that the port was already in use by IIS.
Stopping IIS (Right-click, Exit), resolved the issue.
A related issue:
Wasted 3 hours spanning several days.
On a AWS EC2 machine, below worked:
sudo chown -R $(whoami) /home/ubuntu/.cache
sudo chown -R $(whoami) /home/ubuntu/.config
sudo chown -R $(whoami) /home/ubuntu/.local
sudo chown -R $(whoami) /home/ubuntu/.npm
sudo chown -R $(whoami) /home/ubuntu/.pm2
Hope that helps.
I had problem on Linux. I wrote
chown -R myUserName ./*
in my project folder.