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.
Related
So, I've been working in node.js and react native before in Windows 10 without any issues. But ever since I started using this new laptop, with windows 11 in it, I get these annoying errors.
Doing npm install -g npm#8.3.1 gave me the following result
so I did npm audit fix as suggested, on which I was greeted with this:
and so I did npm i --package-lock-only, again, as suggested. Which got me:
IDK what I'm doing wrong. I don't know how it'll affect me. Can someone help me understand this? Thanks!
You can see from the path in your final screenshot that npm is trying to edit your package-lock.json file in the C:\WINDOWS\System32 directory and does not have permission to do that.
You can refer to this answer on how to update your npm configuration to use a folder that you do have permissions to write to.
You have no problem executing React-native even if you do not perform the npm audit fix command
Also, you are not in the right position to do the command. The command must be executed in your project folder.
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.
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.
I'm trying to run this command to install firebase-admin: npm install firebase-admin --save
When I try to run this command, I get the following error:
ENOENT: no such file or directory, rename 'D:\MyPath\functions\node_modules\firebase-admin\node_modules\grpc\node_modules\abbrev' -> 'D:\MyPath\functions\node_modules\firebase-admin\node_modules\grpc\node_modules\.abbrev.DELETE'
I have tried reinstalling Node.js, I have tried uninstalling a previous version of Node.js, I have tried updating npm, I have tried pretty much everything online but nothing is helping. If I run the newest version of Node.js, instead of getting this error, I get the following error:
Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
I have honestly tried several GitHub threads for people with the same problem but none of their solutions have worked for me, so I am trying here. Can anybody help me with this issue?
Upon further tinkering with this, it looks like I finally solved my issue so i can finally deploy to Firebase. These are the steps I took to solve this problem:
First, I uninstalled firebase-admin using the npm uninstall firebase-admin command.
I reinstalled firebase-adming using the npm install firebase-admin command. This didn't seem to fix my issue, but you never know.
I deleted the firebase-admin directory in the node_modules directory.
I ran npm install
I installed the firebase-admin directory again, this time using npm install firebase-admin --save
I ran firebase deploy and it worked!
I don't know how many of those steps were truly necessary but in the end, it worked.
Try to install it using yarn it will get installed smoothly as I faced the same issue while using npm I ran
yarn add firebase-admin and it got easily installed
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