reinstalled npm - now npm works only with sudo (osx high sierra) - node.js

I was unable to install electron in my system (was getting postinstall error). So I thought let me uninstall and reinstall node and npm. I tried this gist and couldnt install npm - that erred out. So I went to node js website and downloaded versions: node 8.9.0 & npm 5.6.0. While I now have node and npm back, no npm installation works without a sudo. Funny thing, I get the same electron installation error. I tried fixing the sudo problem using this link but no help. Please advise!
Screenshot of the npm error:
Screenshot of the electron installation error:

Related

Npm install issue HOMEBREW

This is the error I got:
npm install error 3097 error command sh -c node scripts/build.js 3098 error Building: /opt/homebrew/Cellar/node/16.5.0/bin/node
I just switched to Mac from Windows and cloned my repo. Tried to run npm install to install the packages for my react app and got this error.
I installed node with homebrew.
The issue seemed to be related with installing node with home brew. As a quick and easy fix I just ran brew uninstall node and then went to the nodejs website and installed it for mac manually. This took care of the issues and I was able to install my packages successfully.

I am having problems installing underscore with npm

I have the NodeJS LTS v14.15.0 installed on my Windows 10. I have npm 5.5.1. I am trying to install Underscore via the command prompt npm i underscore. I keep getting the message "npm does not support Node.js v14.15.0".
I have tried to reinstall NodeJS, expecting to have the newest version of npm installed along with it, but I keep getting 5.5.1. I have tried running npm install -g npm, but keep getting the same error "npm does not support Node.js v14.15.0". Not sure what else to do. I am new to NodeJS. Can anyone help with this?
Try to uninstall npm
npm uninstall -g npm
and then reinstall NodeJs.

npm package getting installed but not working

when I am using command npm install -g lerna it gets executed with no error but after that using command
lerna --version gives output "lerna:command not found".
Possible solution
maybe if somehow I manage it to install in usr/local/lib/node_modules it should work cause other npm packages installed here are working fine but its getting installed in /home/surajkulriya/.npm-global/lib/node_modules.
OS: ubuntu 18.04
which npm:/usr/local/bin/npm
which node:/usr/local/bin/node
which nodejs:/usr/bin/nodejs
Finally after too much effort I sorted out the issue. I removed node nodejs and npm completely and reinstalled them again and used command
npm i -g npm
to fix the broken dependecies.I reinstalled lerna and it worked.

error 404 installing node-sass --save-dev

im a new beginner in html/css development with windows 10. I'm trying to use Saas for my website project but when I am trying to install node-sass, I get the following errors:
PS C:\wamp64\www\flexbox> npm install node-saas --save-dev
npm ERR! code E404
npm ERR! 404 Not Found: node-saas#latest
npm version is : 6.3.0
node version is : 8.11.3
I've already try this: Unable to install node-sass in my project but it doesn't work.
I'v try to open cmd as administrator, and try executing the same commands. Same problem again...
Can you please help me to find a solution ? Thanks !
You're installing node-saas. You meant to install node-sass, double s and a single a.

node.js on Windows - npm install just hangs

Installed node.js ver 0.10.13, 64 bit on windows 7. I tried npm install commander, npm install cheerio, npm install mysql. None of the npm installs work. It hangs with message, Example: npm http GET https://registry.npmjs.org/commander.
Can someone tell me how to fix this?

Resources