Comments (35)
It go resolved!!!
- Switch to Login module (by typing "how-to-npm" on command line)
- Type "npm adduser" to login
- Type "npm whoami" to confirm if logged in
- Switch back to the package at which you are getting error(my case it was Publish Again)
- Type "npm publish"
- Done
from how-to-npm.
My issue was that I had the publishConfig
object specified in package.json
which defined an invalid URL (some private registry).
Had to set it up like this:
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
from how-to-npm.
Does not work!
npm adduser
Username: xxxxxx
Password:
Email: (this IS public) [email protected]
Logged in as xxxxx on https://registry.npmjs.org/.
➜ lib1 npm publish
npm ERR! code ENEEDAUTH
npm ERR! need auth auth required for publishing
npm ERR! need auth You need to authorize this machine using `npm adduser`
from how-to-npm.
@AnandWalvekar That workaround didn't work for me. Still fails to publish, even when npm whomi correctly returns my username.
Getting the following output:
npm ERR! publish Failed PUT 404
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "node" "C:\\Users\\USERNAME\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "publish"
npm ERR! node v0.12.5
npm ERR! npm v2.13.3
npm ERR! code E404
npm ERR! 404 missing : @myUser/how-to-npm
npm ERR! 404
npm ERR! 404 '@myUser/how-to-npm' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\USERNAME\Documents\node_code\nodeschool.io\how-to-npm\npm-debug.log
from how-to-npm.
My issue was that I had the
publishConfig
object specified inpackage.json
which defined an invalid URL (some private registry).
Had to set it up like this:"publishConfig": { "registry": "https://registry.npmjs.org/" },
yes, when i delete publishConfig
in package.json,I can publish it normally。
from how-to-npm.
In my ci script, I have resolved this issue using a _auth token and setting up the user email like this :
npm config set _auth $NPM_REGISTRY_TOKEN && npm config set registry $NPM_REGISTRY_URL && npm config set always-auth=true && npm config set [email protected]
from how-to-npm.
I keep getting the same error even when I successfully login. npm whoam
give me the correct user but it keep failing no matter what.
from how-to-npm.
- What OS u have?
- what is ur
.npmrc
content or - what is output of
npm config list
?
I see, you have https://registry.npmjs.org/
as registry, so I assume npm get registry
will show it. have you tried to change to http://registry.npmjs.org/
(http).
strict-ssl = false
set?- Are u under/behind the some proxy/vpn?
from how-to-npm.
Ditto, same software versions and same error.
from how-to-npm.
I'm running into this error as well. Any suggestions on how to bypass it?
from how-to-npm.
Same issue here. It sounds like @alabebop has a workaround, but I am too new to this environment to understand it. Is any further guidance available?
from how-to-npm.
Getting same error as @devhammer, with node v0.10.35 on Windows 10.
from how-to-npm.
AnandWalvekar's solution worked with me!
from how-to-npm.
The work around fixed it for me as well. Wasted a bunch of time getting there though.
from how-to-npm.
Solution worked for me as well, thanks @AnandWalvekar
from how-to-npm.
Workaround worked for me. Cheers @AnandWalvekar
from how-to-npm.
@AnandWalvekar thanks a lot it worked but I had to bump the version.
Could a skip be provided for this step?
from how-to-npm.
Also had this error and workaround worked for me.
from how-to-npm.
Workaround worked for me. Cheers @AnandWalvekar
from how-to-npm.
closing in favor of #46. i believe the windows problem is already doc'd in #37
from how-to-npm.
AnandWalvekar's solution worked with me!
from how-to-npm.
I have documented the issue and solution here #8 (comment) .
from how-to-npm.
@AnandWalvekar's solution worked for me as well!
from how-to-npm.
@AnandWalvekar's solution worked for me! I suggest adding this as a tip in the module in case someone has the same issue
from how-to-npm.
@AnandWalvekar Thanks for the solution
from how-to-npm.
I had to go through the steps a few times but the work around for the solution mentioned above does work :)
from how-to-npm.
@AnandWalvekar thx for the WA.. worked like a charm :)
from how-to-npm.
@AnandWalvekar solution works for me locally. but At the moment I can't figure out why the same flow doesn't work on Jenkins.
If someone has ideas, I will very thankful.
This is cut from my custom .npmrc file created by Jenkins.
; userconfig /home/builder/.jenkins/jobs/FDD test - simple project/workspace@tmp/config3550090785588839693tmp
always-auth = true
registry = "https://my-server.com:8443/repository/my-hosted-npm"
strict-ssl = false
always-auth = true
means, that I provided NPM user credentials on jenkins level, and I expected Jenkins pass/substitute creds during npm publish
but I can't get why it doens't work..
from how-to-npm.
OS: Linux renato 4.4.0-104-generic #127-Ubuntu SMP Mon Dec 11 12:16:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
//registry.npmjs.org/:_authToken=cef314xxxxxxx
init.author.name=Renato Athaydes
init.author.email=renatoathaydes@xxxx
➜ npm config list
; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/5.6.0 node/v9.4.0 linux x64"
; userconfig /home/renato/.npmrc
init.author.email = "renatoathaydes@xxxx"
init.author.name = "Renato Athaydes"
; node bin location = /home/renato/.nvm/versions/node/v9.4.0/bin/node
; cwd = /home/renato/programming/projects/node-lib-mismatch/lib3
; HOME = /home/renato
; "npm config ls -l" to show all defaults.
I am at home, no proxies. No strict-ssl = false
that I can see. And I would prefer to not use http
.
from how-to-npm.
npm whoami
is correct
I use sudo npm publish
is failure,when i switch back to normal user then it worked
from how-to-npm.
I just delete currentdir/.npmrc and then use nrm use
to switch npm registry. And It works.
from how-to-npm.
@Bittttter nrm use
is not a thing. ?
from how-to-npm.
I had to go pro, publish the package, make the package public, and open a ticket to get my money back. It was super stupid.
from how-to-npm.
It go resolved!!!
- Switch to Login module (by typing "how-to-npm" on command line)
- Type "npm adduser" to login
- Type "npm whoami" to confirm if logged in
- Switch back to the package at which you are getting error(my case it was Publish Again)
- Type "npm publish"
- Done
Thank you, it helped to solve my problem
from how-to-npm.
In my ci script, I have resolved this issue using a _auth token and setting up the user email like this :
npm config set _auth $NPM_REGISTRY_TOKEN && npm config set registry $NPM_REGISTRY_URL && npm config set always-auth=true && npm config set [email protected]
@JMuhire
its 2024 and I wanna thank u for this!
i just added
registry=
_authToken=
to the .npmrc
file and it workeddd
from how-to-npm.
Related Issues (20)
- Update the label names HOT 1
- Pull request #108 rolls back fix #57 HOT 5
- Incorrectly reports wrong folder on windows due to case sensitivity HOT 1
- Version checking issue with "00 Install npm" exercise HOT 3
- how-to-npm HOT 2
- Very basic NPM newbie question HOT 2
- Cannot publish HOT 2
- npm publish needs a paid account HOT 3
- Renew the problems to support npm@5
- Error, when trying to reset registry HOT 3
- when I type how-to-npm in terminal It gives me the following error HOT 2
- Challenge 00: doesn't tell you how to check version HOT 1
- npm-init fails in Dev Enviroment
- No outdated packages ... HOT 1
- "npm install <package-name>" better than "npm install <module-name>"
- should keep bundleDependencies in package.json? HOT 1
- no such file or directory, chmod '/usr/local/lib/node_modules/how-to-npm/node_modules/mkdirp/bin/cmd.js' HOT 6
- Error: Cannot find module 'workshopper-adventure/adventure' HOT 1
- npm adduser -> Error: code ENYI Web login not supported
- Is this repository still being maintained in 2023? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from how-to-npm.