I can't install anything using npm and already tried everything I found online. Please, anyone can help me with that?
Using:
Kubuntu 22.10
Node 18.7.0
npm 8.18.0
I tried:
uninstall & reinstall node and npm
set wi-fi connection to link-local in IPv4 / IPv6
delete package-lock.json
disabling SSH
npm i registry.npmjs.org
npm set progress=false
npm config rm proxy
npm config rm https-proxy
npm config set registry http://registry.npmjs.org/
sudo npm install -g npm#latest
npm cache clear --force
npm cache verify
git config --global http.proxy https://proxy-server:port
Any thoughts?
Related
I have tried to inject angular dependency more and more time by applying this command but every time gets this attached error. If you have any solution please share. Thank you
npm cache clean --force
npm install
npm install --legacy-peer-deps
Angular, npm, node version like this...
npm cache clean --force
npm install -g #angular/cli#latest
Try to look up the registry, I change the registry as https://www.npmjs.com by mistake, change it as follow
npm config set registry https://registry.npmjs.org
My solution:
npm config set registry registry.npmjs.org
npm install or npm install --legacy-peer-deps
I was trying to download expo cli and I got error:-
C:\WINDOWS\system32>npm i -g expo-cli
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://github.com/npm/cli/issues>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Local\npm-cache\_logs\2021-03-03T14_02_14_809Z-debug.log
I also used npm cache clean --force.
But it didn't work too😥
C:\WINDOWS\system32>npm -v
7.6.0
C:\WINDOWS\system32>node -v
v14.16.0
Please help me......
And after doing npm i -g npm it worked!!!!!!
But when I tried to install or download any packages then error:
E:\React-native\practice>npm i react-native-elements
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://github.com/npm/cli/issues>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Local\npm-cache\_logs\2021-03-04T05_03_20_067Z-debug.log
So what is wrong going on?
If you are using npm version 5 or above:
Try following command:
$ sudo npm cache verify
OR
$ sudo npm cache clean --force
I've had the same problem, and was able to fix it by adding the flag --legacy-peer-deps to the installation command. For instance:
npm i --legacy-peer-deps package-name
Run npm install -g npm & npm cache clean
I had the same problem and solved it with checking my proxxy settings in C:\Users\username.npmrc
here are the settings for the proxy.
proxy=...
https-proxy=...
strict-ssl=false
registry=...
You can set these things through npm with the following:
npm config set proxy ...
npm config set https-proxy ...
npm config set strict-ssl false
npm config set registry ...
Maybe you have to remove proxy and https-proxy to make it work.
I had the same problem in all npm package that I tried to download, and solved just running this command in my Windows CMD.
npm set strict-ssl true
You can try to force clean the npm cache
npm cache clean --force
I did the following steps:
delete node_modules
remove package-lock.json
run npm cache clean --force
run npm install --force
npm install --force was the key to success, because even after doing 1-2 steps, normal npm install resulted in same problem
I get this error when I try to install node
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lenovo\AppData\Roaming\npm-cache\_logs\2020-08-29T13_30_35_085Z-debug.log
try this first before installing node.
sudo npm cache verify
sudo npm cache clean --force
After installing verify your installation:
node --version
several things you can try are following
sudo npm cache clean --force
trying changing ownership of npm and try npm latest
sudo chown -R $(whoami) ~/.npm
sudo chown -R $(whoami) /usr/local/lib
sudo chown -R $(whoami) /usr/local/bin
npm install -g npm#latest
give it a try by clearing up the proxy, maybe you're behind proxy
npm config set proxy null
npm config set https-proxy null
npm config set registry http://registry.npmjs.org/
Lately i would like to recommend you to use the NVM package. it is not the solution to your answer directly but its a great way to manage and have different node/npm environments
https://davidwalsh.name/nvm
I am trying to install packages by tutorial
But command npm install --save express body-parser connect-multiparty sqlite3 bluebird path umzug bcrypt returns me error:
Illegal instruction] \ rollbackFailedOptional: verb npm-session 8c141c478c582dd
I tried
npm config rm proxy
npm config rm https-proxy
and reboot system
npm version 6.13.7
node version 13.9.0
OS: Debian 10
the following commands:
npm config rm proxy
npm config rm https-proxy
is to remove proxy settings from global NPM settings. Only use if u are using NPM behind a proxy server.
Try the follow:
npm cache clean --force
This removes the NPM cache. So, try again to run the installation of each of the packages ...
npm install --save express
npm install --save body-parser
npm install --save sqlite3
....
I have a linux box behind a no auth proxy.
I have configured git to use https instead of git.
url.https://.insteadof=git://
I have set my http_proxy and https_proxy environment variables and also the npm proxy.
; cli configs
user-agent = "npm/3.8.6 node/v6.0.0 linux x64"
; userconfig /jenkins/.npmrc
https-proxy = "{host}:8060"
proxy = "{host}:8060"
I can install bower with:
npm install -g bower
but when i try
npm install -g grunt-cli
i get:
npm ERR! fetch failed https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz
npm WARN retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=connect EINVAL 0.0.31.124:80 - Local (0.0.0.0:0)
....
npm ERR! network tunneling socket could not be established, cause=connect EINVAL 0.0.31.124:80 - Local (0.0.0.0:0)
I have tried with npm version
3.8.6 / 2.15.1
Any ideas why i can install bower and not grunt-cli from same account in same session (i can even install grunt globally, and clone grunt-cli)?
UPDATES
1: I am able to do
curl -O https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz
with success, the npm https-proxy is equal to $https_proxy value.
The problem was my npm proxy was host:port, without the "http://" prefix. like the environment variable. works now.
I have no idea why bower installed though.
can you try
npm install -g grunt-cli
this looks like a network problem with your proxy configuration.
Update to the latest version of node and npm, and use the correct proxy settings.