how-to-npm: 03 login : unable to create new user
Trying to go through 03 login but unable to add a user with the adduser command.
This is the message i get in my npm-debug file:
0 info it worked if it ends with ok
1 verbose cli [ '/home/ubuntu/.nvm/versions/node/v4.1.1/bin/node',
1 verbose cli '/home/ubuntu/.nvm/versions/node/v4.1.1/bin/npm',
1 verbose cli 'whoami' ]
2 info using npm@3.5.3
3 info using node@v4.1.1
4 verbose stack Error: this command requires you to be logged in.
4 verbose stack at EventEmitter.whoami (/home/ubuntu/.nvm/versions/node/v4.1.1/lib/node_modules/npm/lib/whoami.js:41:18)
4 verbose stack at Object.commandCache.(anonymous function) (/home/ubuntu/.nvm/versions/node/v4.1.1/lib/node_modules/npm/lib/npm.js:216:13)
4 verbose stack at EventEmitter.<anonymous> (/home/ubuntu/.nvm/versions/node/v4.1.1/lib/node_modules/npm/bin/npm-cli.js:74:30)
4 verbose stack at doNTCallback0 (node.js:407:9)
4 verbose stack at process._tickCallback (node.js:336:13)
5 verbose cwd /home/ubuntu/workspace
6 error Linux 4.2.0-c9
7 error argv "/home/ubuntu/.nvm/versions/node/v4.1.1/bin/node" "/home/ubuntu/.nvm/versions/node/v4.1.1/bin/npm" "whoami"
8 error node v4.1.1
9 error npm v3.5.3
10 error code ENEEDAUTH
11 error need auth this command requires you to be logged in.
12 error need auth You need to authorize this machine using `npm adduser`
13 verbose exit [ 1, true ]
and this is what i get after trying to add a user:
yannhulot:~/workspace/ProjectFolder $ npm adduser
Username: yann
Password:
Email: (this IS public) yann@pc.com
npm ERR! Linux 4.2.0-c9
npm ERR! argv "/home/ubuntu/.nvm/versions/node/v4.1.1/bin/node" "/home/ubuntu/.nvm/versions/node/v4.1.1/bin/npm" "adduser"
npm ERR! node v4.1.1
npm ERR! npm v3.5.3
npm ERR! code E400
npm ERR! Unknown error while authenticating : -/user/org.couchdb.user:yann
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/workspace/ProjectFolder/npm-debug.log
yannhulot:~/workspace/ProjectFolder $
Any help on how to solve the problem would be appreciated. Thanks.
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 16
When you check the configuration, the repository is the default. But if you create the package.json, then the .npmrc is take in account.
So to make it work, you need to switch the process 03 Start a Project and 02 Login.
First, create a project, then your npmrc will be used properly !