Npm publish on Cloud9 doesn't work

Npm publish on Cloud9 doesn't work
0

#1

I am doing the Manage Packages with npm course and going through the how-to-npm.

Running npm-publish gives the following error:

npm ERR! need auth auth required for publishing
npm ERR! need auth You need to authorize this machine using npm adduser

I run npm adduser and login with my npm user details and get the following error. Looks like the login didn’t work but it works fine on the npm site:

npm ERR! 404 missing : -/user/org.couchdb.user:ashnita

Also, npm rm gives the following warning:
npm WARN uninstall not installed in /home/ubuntu/.nvm/versions/node/v4.6.1/lib/node_modules: “test-package”

Any advise?


#2

Maybe NPM on Cloud9 isn’t up to date, have you tried setting up npm locally and publishing from there?


#4

Hello

I also have the following error after updating npm :frowning: with the exercise 00.
It break down npm and doesnt work anymore if i update it.

Error: Cannot find module 'process-nextick-args’
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/home/ubuntu/.nvm/versions/node/v6.11.2/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:26:23)
at Module._compile (module.js:570:32)
at Object.Module._extensions…js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)


#5

Hey @C3ya, when I tried to publish my npm package the first time, I had picked a name that already existed in npm registry. I was able to publish my package after giving it a unique name. You can search for existing packages here: https://www.npmjs.com.

Just now, I created a new workspace and tried to go through the how-to-npm exercises again and got the same error as you after upgrading the npm version. I guess there is currently a problem with the latest version.

So I created yet another workspace and skipped upgrading the npm version and was able to publish a package. Also, now it seems like the how-to-npm exercise to publish your package only publishes to the “make-believe npm workshop land” :slight_smile:

I hope this helps and good luck for getting through the exercises. Happy to try and help with any other problems too.

Ashnita


#6

Hello @ashB100

Thank you for sharing your experience and contributing my issue too.

As you say, if you dont upgrade npm things look ok with c9. On the other hand how-to-npm is leveraging to make the upgrade. So it pissed me off not to be able to work after upgrade :slight_smile:
So I hope you didnt have any other issues with the obsolete version of the npm.

I tried the same steps with my local computer and everything was allright. I think the problem is with the ubuntu instance at c9.

Thank you for the cooperation
Have a nice day


#7

On c9.io1, create a new workspace, give it a name and a description, and then select Node.js as your template - this is a key tip.