Due to a recent security incident, all user tokens have been invalidated - node.js

So I uninstalled the newer version of node that I had on my machine(v8.11.3) and then installed the earlier version v6.11.0 (because my project needs earlier version to do a grunt build). Now when I try to do npm install to restore the packages for my project it gives the following error.
Due to a recent security incident, all user tokens have been invalidated. Please see https://status.npmjs.org/incidents/dn7c1fgrr7ng for more details. To generate a new token, visit https://www.npmjs.com/settings/~/tokens or run npm login.
I tried doing a npm login to generate the token (token generation was successful) but throws same error when I try doing npm install the next time.

I got same issue last time.
Steps that I did:
I went to https://www.npmjs.com/settings/~/tokens and generate my token there.
Open new terminal
Execute npm whoami and check if your username appears. If not, do npm login
You should be able to npm install again
Hope it helps

I was facing the same problem as you.
If you save the npm token inside your project folder, delete the file and do npm install. Look for the file named .npmrc and delete that.
Let me know if that helps.

I was trying to install a package and I was getting the same error. After some time i realised that the package name which I was installing doesn't exists and npm was giving me this error.

Related

Npm unable to authenticate, your authentication token seems to be invalid

I am trying to do npm install on a GitHub project that I have pulled. After a while, it gives me this npm login error.
After the error, I have run npm login and successfully login with my credentials but it keeps giving me the same error.
I have also uninstalled node and npm and installed them again, updated them to the latest versions, deleted information inside the .npmrc file and nothing seems to work.
I have tried to do npm install with other GitHub projects and it is working fine. I have no idea why this is happening
Thanks for the help
Figure out after a couple of days deleting package-lock.json make it work.

npm ERR! cb() never called in windows10

I was trying to run npm install inside the project folder but every time there is this error showing npm cb() never called.
I am using node version 10.16.2 and npm version 6.9.0 in windows 10
I have tried npm cache clean --force but that didn't help
E:\contribution\contribute-to-open-source>npm install
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\papun\AppData\Roaming\npm-cache\_logs\2019-08-10T03_51_20_512Z-debug.log
I had the same problems and lost hours trying to solve it :(.
But then i found out that my firm has installed some new kind of firewall with self signed certificate.
Quick solution was:
npm config set strict-ssl=false
After that everything started working without 'npm cb() never called' errors
I had faced the same issue, and i spend days to get a solution for the issue. In the end, i figured it out and it was an issue with my network.
Please verify your network connection and proxy settings.
In my case, I was using corporate proxy using a script. When i opened the pac file and get the proxy from there ( take XXX:XXX from the line return "PROXY XXX:XXX;";) and added to npm config proxy setting (npm config set proxy XXX:XXX), it started working and got resolved.
run this all issue will be solved..
npm install --global windows-build-tools
try to set your proxy using the commands
npm config set proxy http://proxy_host:port
npm config set https-proxy https://proxy_host:port
I have deleted all the node_modules, package-lock.json but still it was not working. For me the reason was, there were some modules that required relogin to install.
So, I deleted my node_modules, build and package-lock.json. and opened command prompt in admin mode.
Then went to the specific project path and logged-in to the components that require credentials.
1. npm login (root path of your react app)
2. type username as "<xxxxx>"
3. type password as "<yyyyy>" (won't be visible on console)
4. type email as "<zzzz>#<aaa>.com"
5. npm i
6. npm run build
It worked for me.
I also faced the same problem I deleted that file from
C:\Users\Harshk1311\AppData\Roaming\npm-cache\_logs
And problem solved
Double Check file name in terminal where error occured and delete file
i.e C:\Users\Harshk1311\AppData\Roaming\npm-cache_logs\2019-08-10T03_51_20_512Z-debug.log
Delete 2019-08-10T03_51_20_512Z-debug.log only this file .
Another possible reason that solved the problem in my case:
Missing MS VC Redistributable. For example if you are on a fresh new PC. In this case you could download the e.g. VC_redist.x64.exe and install it. You may need to restart the terminal before e.g. executing npm i again.
The Visual C++ Redistributable installs Microsoft C and C++ (MSVC) runtime libraries. These libraries are required by many applications built by using Microsoft C and C++ tools.

When using 'npm' it requires me to login to github

Problem When i try to use npm in any way, ex: npm update or npm i package it immediatly gives me a github login prompt.
What i tried using npm with i, install, and even giving it git directly git://. But none worked sadly.
I am new to Node.js. So far (2 weeks), i have been updating, installing and reinstalling dependencies without a problem. Just now this issue occured.
What i was doing before the error occured was nothing special. Just programming. Last thing i used npm for was to install discord.js npm i discord.js.
Thank you in advance.
to have such a problem, it means your command is wrong. take for example you are trying to install angular cli and you omit the # symbol login will pop like so
npm install -g angular/cli // this will trigger login pop-up
npm install -g #angular/cli // will work fine
so check your command
This issue has been resolved. The problem was very simple but i couldn't figure it out at first.
So what was wrong with my issue here was that i accidently while working on my project changed a value in the "Package.json" file. This is ofcourse not intended. With that, my whole project's 'npm' command was broken where it could't work anymore.
Thank you everyone for your time.

can't update npm (missing access)

Breaking my head to get over that error. I've tried every forum but still I can't find a proper solution. I also uninstalled and reinstall npm and still same issue.
Please save me!
npm error
and also
log
ta!
Just a wild guess:
remove .npm-modules in your home folder
remove modules from the project you are using
npm install, all should be fine
Use homebrew to install npm and nodejs. Write the command as shown below:
brew install node . Once it is successfully installed check it with node -v.
For more details you can go through this tutorial

phonegap installation fails due to package failure on https://github.com/ariya/esprima/tarball/master

I have an error when installing phonegap.
I have a problem with the https://github.com/ariya/esprima/tarball/master package, as it cannot be installed.
I have changed many different registries but all failed on the esprima module.
I even download the exact tarball manually from github and executed the following on the local filesystem:
npm install file_url
There is no sign of failure but "phonegap" command cannot still be used.
Please tell me how to install the failed module and finally get phonegap to work?
Thank you very much!

Resources