3

I have a project specific npmrc which I added to the root of my project with the following settings

registry=<internal registry>
_auth = <auth token>
email = <email id>

I then run

npm publish

but I still get the following error.

+ npm publish
npm ERR! need auth auth and email required for publishing
npm ERR! need auth You need to authorize this machine using `npm adduser`

I am not sure why this is happening. My guess is that it isn't reading my project specific npmrc.

user3626708
  • 727
  • 2
  • 8
  • 24
  • why would I need that? I gave it a shot but still same error. Npm publish command is already there on my machine – user3626708 Jun 19 '16 at 04:59
  • Silly question but are you in the project's root directory that you're trying to publish when running the command? Have you run 'npm adducer'? – VtoCorleone Jun 19 '16 at 05:48
  • So this works fine when I have the settings in my home directory that is ~/.npmrc but I need this to work on remote box which is why I was trying to have the .npmrc be a project level – user3626708 Jun 20 '16 at 16:30

0 Answers0