Unable to run npm install successfully - npm

I'm trying to run npm install (NPM version 8.13.2) but I'm getting this error:
npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR! https://www.npmjs.com/forgot
npm ERR!
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR! npm login
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sipospeter/.npm/_logs/2022-07-07T15_22_06_762Z-debug-0.log
I can't figure out what to do, I've updated and logged in to NPM. I've reset my password too.
What do I have to do to fix it?

Ensure you have RW permission for the folder where npm install is executed, also try npm install -g.

Related

How to use FontAwesome

I've got an .npmrc file set up globally for all of my projects with the following contents:
#fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=********-****-****-****-***********
When I run npm install --save #fortawesome/fontawesome-pro via FontAwesome Docs, I receive the following error message:
npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR! https://www.npmjs.com/forgot
npm ERR!
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR! npm login
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ryan_\AppData\Local\npm-cache\_logs\2022-03-03T23_34_32_319Z-debug-0.log
This message gives the impression that I'm logged out of npm or have outdated credentials, but I've updated the password and logged back in to find the same error present.
running npm whoami returns my username as expected.
FontAwesome support has run me through several troubleshooting steps to no avail. Has anyone experienced this issue? Thanks in advance.

NPM Install Incorrect or missing password Error

I am following Strapi's quick start guide to create strapi project. After running this command npx create-strapi-app#latest my-project --quickstart , when trying to run npm install from my-proect directory I am getting the following error:
npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR! https://www.npmjs.com/forgot
npm ERR!
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR! npm login
I logged in through npm login command and again run npm install but no luck.
Versions:
user#users-MacBook-Pro my-project % node -v
v14.17.0
user#users-MacBook-Pro my-project % npm -v
8.1.4

Npm install does not installs secure package though i do npm login followed by npm install commands

Even after logged in using npm login command successfully i get the below error
npm whoami
npm ERR! code E401
npm ERR! 401 Unauthorized - GET https://registry.npmjs.org/-/whoami
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/bharathkumar/.npm/_logs/2021-09-09T08_42_29_365Z-debug.log
Try removing contents/remove file .npmrc in the project folder or the user's home folder

npm ERR! code E401 Incorrect or missing password.If you were trying to login, change your password, create an authentication token

Before Trying tis on My new M1 Macbook Air i tried it on Old MacBook and it works seamlessly on older machine like a charm
My
package.json
{
"name": "root",
"private": true,
"devDependencies": {
"lerna": "^3.20.2"
}
}
Steps i followed
1.
npm config set registry "https://npm.pkg.github.com/ABC"
npm login --scope=#ABC --registry=https://npm.pkg.github.com
username: gitusername
Password: PersonalAccessToken
Email: MyEmail#Organization.com
Logged in as gitusername on https://npm.pkg.github.com/.
3.
npm install -g lerna typescript npm-check-updates
Facing this issue as
npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at: npm ERR!
https://www.npmjs.com/forgot
npm ERR! npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR! npm login
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/gajanan/.npm/_logs/2021-04-02T05_22_22_130Z-debug.log
PS :ALL THE COMMANDS WORKS ON MY OLD MACBOOK AIR
I struggle with this problem for a very long time, read all the related answers, but there is no clarity.

When I try to install a package with npm it gives me a permission denied error

When I try to install any package with npm even with sudo I get a permission denied error.
sudo npm install sqlite3
I get the following error:
sh: 1: node-pre-gyp: Permission denied
npm WARN discord.js#11.5.1 requires a peer of #discordjs/uws#^10.149.0 but none is installed. You must install peer dependencies yourself.
npm WARN youbot#0.2.3 No description
npm WARN youbot#0.2.3 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! sqlite3#4.1.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the sqlite3#4.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-12-01T19_13_09_034Z-debug.log
Any help would be appriciated. Thank you all!
You need this package to be installed first #discordjs/uws#^10.149.0