Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

03 login : unable to create new user #55

Open
YannHulot opened this issue Jan 9, 2016 · 16 comments
Open

03 login : unable to create new user #55

YannHulot opened this issue Jan 9, 2016 · 16 comments

Comments

@YannHulot
Copy link

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 [email protected]
3 info using [email protected]
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) [email protected]
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.

@YannHulot
Copy link
Author

I should add that I am running nodeJs on a cloud9 server.

@caal-15
Copy link

caal-15 commented Jan 29, 2016

Getting the same error here (Local installation of node)

@bruno-fs
Copy link

also having this issue on cloud9

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.7.1
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! syscall connect

npm ERR! Error: connect ECONNREFUSED 127.0.0.1:15443
npm ERR!     at Object.exports._errnoException (util.js:837:11)
npm ERR!     at exports._exceptionWithHostPort (util.js:860:20)
npm ERR!     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1060:14)
npm ERR!  { [Error: connect ECONNREFUSED 127.0.0.1:15443]
npm ERR!   code: 'ECONNREFUSED',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   syscall: 'connect',
npm ERR!   address: '127.0.0.1',
npm ERR!   port: 15443 }
npm ERR! 
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly.  See: 'npm help config'

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/workspace/how-to-npm/npm-debug.log

@huwd
Copy link

huwd commented Feb 12, 2016

I had a similar issue though not on C9.io...

I was getting npm ERR! Unknown error while authenticating : -/user/org.couchdb.user:<username>

Turns out that my username was already taken but the error message wasn't helpful. I ended up going to the npm website and signing up there - with a now modified username - and then used the npm login command from terminal to complete the challenge.

Hope that helps someone.

@caal-15
Copy link

caal-15 commented Feb 12, 2016

@huw remember that it should be a test environment and you shouldn't have
to create a Real npm account.
On Feb 12, 2016 6:46 AM, "huw" [email protected] wrote:

I had a similar issue though not on C9.io...

I was getting npm ERR! Unknown error while authenticating :
-/user/org.couchdb.user:

Turns out that my username was already taken but the error message wasn't
helpful. I ended up going to the npm website https://www.npmjs.com and
signing up there - with a now modified username - and then used the npm
login command from terminal to complete the challenge.

Hope that helps someone.


Reply to this email directly or view it on GitHub
#55 (comment).

@huwd
Copy link

huwd commented Feb 12, 2016

O_O oh... err... oops. Time to backtrack.

@rileygelwicks
Copy link

I had the same error because the user I was creating was the same name as my logged in user on my machine. Once I used a different name it worked.

@adsnjhfyeqw231eas
Copy link

i am facing this error:

npm ERR! Linux 4.2.0-c9
npm ERR! argv "/home/ubuntu/.nvm/versions/node/v4.3.2/bin/node" "/home/ubuntu/.nvm/versions/node/v4.3.2/bin/npm" "adduser"
npm ERR! node v4.3.2
npm ERR! npm v3.8.1
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! syscall connect

npm ERR! Error: connect ECONNREFUSED 127.0.0.1:15443
npm ERR! at Object.exports._errnoException (util.js:870:11)
npm ERR! at exports._exceptionWithHostPort (util.js:893:20)
npm ERR! at TCPConnectWrap.afterConnect as oncomplete
npm ERR! { [Error: connect ECONNREFUSED 127.0.0.1:15443]
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect',
npm ERR! address: '127.0.0.1',
npm ERR! port: 15443 }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly. See: 'npm help config'

npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/workspace/npmproject1/npm-debug.log

how to resolve this? I added entirely new user with new username and password and new email but exactly same error!

@legend911
Copy link

I have been getting that same error for weeks now... I don't know what to do. I am also on Cloud 9. Do they just have a problem?

@maddymaster
Copy link

I am also facing the same problem

maddymaster:~/workspace/myproject $ npm adduser
Username: maddymaster
Password:
Email: (this IS public) [email protected]
npm ERR! Linux 4.2.0-c9
npm ERR! argv "/home/ubuntu/.nvm/versions/node/v4.3.2/bin/node" "/home/ubuntu/.nvm/versions/node/v4.3.2/bin/npm" "adduser"
npm ERR! node v4.3.2
npm ERR! npm v3.8.1
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! syscall connect

npm ERR! Error: connect ECONNREFUSED 127.0.0.1:15443
npm ERR! at Object.exports._errnoException (util.js:870:11)
npm ERR! at exports._exceptionWithHostPort (util.js:893:20)
npm ERR! at TCPConnectWrap.afterConnect as oncomplete
npm ERR! { [Error: connect ECONNREFUSED 127.0.0.1:15443]
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect',
npm ERR! address: '127.0.0.1',
npm ERR! port: 15443 }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly. See: 'npm help config'

npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/workspace/myproject/npm-debug.log

and this is my package.json
{
"name": "npm",
"version": "1.0.1",
"description": "my new test",
"main": "index.js",
"scripts": {
"test": "node test.js"
},
"author": "maddymaster",
"license": "ISC",
"dependencies": {
"@linclark/pkg": "^1.0.2"
},
"repository": ""
}

what can be the problem? I have tried everything including starting over again on how-to-npm with a completely new user no go.

@legend911
Copy link

I solved this by starting a new cloud9 workspace for node.js and comparing things. It turned out that my package.json file had some major changes in it after doing one of the npm solutions.

You can also just pull your repository of work into a new cloud9 workspace and delete your old package.json file.

On Mar 17, 2016, at 08:02, Maddy [email protected] wrote:

I am also facing the same problem

maddymaster:~/workspace/myproject $ npm adduser
Username: maddymaster
Password:
Email: (this IS public) [email protected]
npm ERR! Linux 4.2.0-c9
npm ERR! argv "/home/ubuntu/.nvm/versions/node/v4.3.2/bin/node" "/home/ubuntu/.nvm/versions/node/v4.3.2/bin/npm" "adduser"
npm ERR! node v4.3.2
npm ERR! npm v3.8.1
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! syscall connect

npm ERR! Error: connect ECONNREFUSED 127.0.0.1:15443
npm ERR! at Object.exports._errnoException (util.js:870:11)
npm ERR! at exports._exceptionWithHostPort (util.js:893:20)
npm ERR! at TCPConnectWrap.afterConnect as oncomplete
npm ERR! { [Error: connect ECONNREFUSED 127.0.0.1:15443]
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect',
npm ERR! address: '127.0.0.1',
npm ERR! port: 15443 }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly. See: 'npm help config'

npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/workspace/myproject/npm-debug.log

and this is my package.json
{
"name": "npm",
"version": "1.0.1",
"description": "my new test",
"main": "index.js",
"scripts": {
"test": "node test.js"
},
"author": "maddymaster",
"license": "ISC",
"dependencies": {
"@linclark/pkg": "^1.0.2"
},
"repository": ""
}

what can be the problem? I have tried everything including starting over again on how-to-npm with a completely new user no go.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

@maddymaster
Copy link

thank you @legend911 I will create a new workspace again and try out. I will share the outcome here once done :)

@soulchainer
Copy link

Hi. I just tried this, like part of Free Code Camp path and, you now where the problem is here?

Well... I'm sorry to say this, but the problem is that this part

Because this is just a tutorial adventure, remember, we're not
actually creating an account anywhere.

Is, well... not true.

At least it seems that way.
I was getting errors because, well, I was using a username already created in the npm registry (my own nick, that I had already registered). With a non registered name, it passed.
Later, I check the registry and here it was, my «not
actually created account anywhere» created.

And when you verify that pass with how-to-npm, the tutorial says to you that:

Congratulations, pineapplesama!
You are the proud owner of an imaginary new npm account!

Well: it doesn't seems pretty much imaginary to me, you know? https://www.npmjs.com/~pineapplesama
Feels pretty real.

If the text of this 03 really doesn't pretend to mislead people into creating real accounts, I think it's failing on it. Maybe I'm wrong, but this is the feeling I have right now.

@celogeek
Copy link

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 !

@maddymaster
Copy link

This worked, great find. Thank you so much.

@ManBearPigg
Copy link

If you came here from FreeCodeCamp and are getting this error on Cloud9, please see the solution posted by celogeek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests