@postremalone said in NPM install is giving Error.:
NPM install is giving error.
Help please.
I meet the same issue than you and I solved it by uninstalling nodejs
sudo apt-get remove nodejs
and reinstall nodejs by using the MagicMirror install script
bash -c "$(curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)"
During the installation, npm install -g npm@latest give me this error
npm ERR! path /usr/lib/node_modules/npm/node_modules/ansi-regex
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules/npm/node_modules/ansi-regex'
npm ERR! { Error: EACCES: permission denied, access '/usr/lib/node_modules/npm/node_modules/ansi-regex'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/lib/node_modules/npm/node_modules/ansi-regex\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules/npm/node_modules/ansi-regex' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
and I run same command as root to solved this
sudo npm install -g npm@latest
Here is version of nodejs install by MagicMirror script :
Installed Node version: v9.11.2