I have the following line in my dependencies in package.json
:
"log": "https://git.mydomain.com/myproject/myrepo/repository/archive.tar.gz?ref=0.1.0",
I get the following:
km@Karls-MBP ~/dev/vertica (km/ref) $ npm install npm ERR! code E401 npm ERR! 404 401 Unauthorized: log@https://git.mydomain.com/myproject/myrepo/repository/archive.tar.gz?ref=0.5.0 npm ERR! A complete log of this run can be found in: npm ERR! /Users/km/.npm/_logs/2018-02-16T08_49_38_669Y-debug.log
I don't know if the issue is GitLab (where the repo exists) or NPM.
To Save : npm install --save {package_name} . This will save the package to package. json and install using npm install . You can't particularly control the dependencies(fully).
adduser npm-adduser The username, password, and email are read in from prompts. You may use this command multiple times with the same user account to authorize on a new machine. When authenticating on a new machine, the username, password and email address must all match with your existing record.
Remove .npmrc from the Home Directory, it should be able to work. I did the same and it works for me.
My user directory .npmrc file had a stale authtoken as below.
//registry.npmjs.org/:_authToken=3615fa68-123a-4d72-b99a-772b5b1edc48
By removing this line, the npm installation works fine and no longer throws an authentication error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With