Cannot Install Any Package NPM Node-JS - node.js

The problem I face is when I will install one of the packages NPM is always show
[............] /roolbackFailedOptional: verb npm-session ....
and the final show error like :
npm ERR! code e503
npm ERR! 503 Service Unavailable:
npm ERR! A complete log of this run can be found in:
npm ERR! C:Users\.......\AppData\Roaming\npm-cache\_logs\2018-08-08t08_09_25_773Z-debug.log
I have already found a solution from here. But it didn't worked.
The configuration NodeJS in my system :
and i use version for
NodeJS : 10.8.0
npm : 6.2.3
Please help me for fixed my problem...

not sure if it will fix your issue but i used
npm install --proxy proxy_address:port install package_name --save
when i had troubles with proxy, if this works, then you might have configured npm settings not the way you need to.

Related

Error while trying to create react app using npm

I'm trying to creating react app using create-react-app command but I get this error message:
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/dotenv-expand: Socket timeout
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\IMAD\AppData\Local\npm-cache\_logs\2022-02-12T18_27_46_293Z-debug-0.log
I tried to clean cache:
npm cache clean -f
I also tried restarting the computer and reinstall nodejs and npm, but nothing was fixed.
Can anyone know what is the issue? and how can I solve it?
You should use npx command (not npm) like that as in official documentation : https://reactjs.org/docs/create-a-new-react-app.html
npx create-react-app my-app
After more than 3 days of working on this error, I found the solution and fixed the problem by install another version of Nodejs.
The current version was v16.14.0 when I got this error. And now it's v16.0.0 and everything's is work just fine.
New versions of nodejs are not stable, downgrade to 16.0.0 was the better thing i made.
I solved this using the following command.
npm uninstall -g create-react-app
then
npm install -g create-react-app

Geolocation install problems

Trying to install Geolocation in my ionic App
and keep getting the error below,
can anyone help?
npm ERR! code E405 npm ERR! 405 Method Not Allowed - GET
https://registry.npmjs.org/#ionic-native%2fgelocation/cordova-plugin-geolocation
npm ERR! A complete log of this run can be found in: npm ERR!
/Users/PetalsTwine/.npm/_logs/2020-07-08T14_39_11_876Z-debug.log
Make sure NPM is install in your machine. to check npm version run npm -v in command propmpt
Then you have to run,
npm config set registry https://registry.npmjs.org/
Then run npm i geolocation

npm install error web project

When I try install npm modules I see the following problem:
PS C:\Users\maxzag\Desktop\svoi> npm install
npm ERR! Cannot read property '0' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\maxzag\AppData\Roaming\npm-cache\_logs\2017-08-15T11_25_41_473Z-debug.log
Can someone already come across this problem and can something advise?
This might be your issue: https://github.com/npm/npm/issues/17858
Try removing node_modules and running npm install again.

Installing material-design-lite with NPM

I'm working on a MEAN stack (Mongo, Express, Angular, Node) and would like to use Google's Material Design Lite library. According to the docs one should run
npm install material-design-lite --save
Inside an NPM project to enable use of the mdl components. I get following error:
npm ERR! Failed at the material-design-lite#1.0.0 install script 'napa mojombo/clippy'.
npm ERR! This is most likely a problem with the material-design-lite package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! napa mojombo/clippy`
So there's a problem with napa mojombo/clippy anyone have an idea how to fix this?
try to find the root cause with verbose
npm install material-design-lite --save --verbose
npm install material-design-lite#1.0.0-3
this should work, issue here

Error installing Steroids.js on Mac through Terminal

I've been looking at Steroids as an alternative to PhoneGap for performance reasons. I've tried installing it through Terminal, but I don't really know what I'm doing. :)
I've gone through the documentation, but when I run this: steroids create TestApp, I get this error: steroids: command not found.
Also, after installing Node.js and running this line: npm install steroids -g, it outputs lines like this:
npm http GET https://registry.npmjs.org/steroids
npm http 304 https://registry.npmjs.org/steroids
etc. At the end, I get this:
npm ERR! fetch failed https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.1.14.tgz
npm ERR! fetch failed https://registry.npmjs.org/minimatch/-/minimatch-0.2.9.tgz
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/MyUser/npm-debug.log
npm ERR! not ok code 0
I have no idea what is going on here, so if you need more details, please let me know. :) Is there something I'm doing wrong? Thanks!
EDIT: I also get this error while the script is being run: npm ERR! registry error parsing json
It's because the NPM registry is currently (as of 11/4/2013 5:44PM eastern time) down. You can check the status on their status page.
Try to install with sudo
sudo npm install steroids -g

Resources