npm / registry-issue-archive

An archive of the old npm registry issue tracker
https://npm.community
249 stars 47 forks source link

Published package isn't available on NPMJS and cli. #333

Open StarpTech opened 6 years ago

StarpTech commented 6 years ago

Hi, I'm trying to publish a new version of nats-hemera but it doesn't work. I can publish it again and again with no error. The version isn't listed and can't be installed in the cli. I also tried it with yarn so it must be a registry issue.

E:\Repositorys\hemera\packages\hemera [master ≡]> npm publish
+ nats-hemera@5.6.0
E:\Repositorys\hemera\packages\hemera [master ≡]> npm publish
+ nats-hemera@5.6.0
E:\Repositorys\hemera\packages\hemera [master ≡]> npm publish
+ nats-hemera@5.6.0
E:\Repositorys\hemera\packages\hemera [master ≡]>
gertsonderby commented 6 years ago

Experiencing this right now with orc-scripts@0.3.22. Repeated publish runs succeed, nothing is updated on either web or registry.

gertsonderby commented 6 years ago

Potentially related: Running publish verbose shows the following:

npm http request PUT http://registry.npmjs.org/orc-scripts
npm http 301 http://registry.npmjs.org/orc-scripts
npm verb headers { date: 'Mon, 28 May 2018 08:33:55 GMT',
npm verb headers   'transfer-encoding': 'chunked',
npm verb headers   connection: 'keep-alive',
npm verb headers   'cache-control': 'max-age=3600',
npm verb headers   expires: 'Mon, 28 May 2018 09:33:55 GMT',
npm verb headers   location: 'https://registry.npmjs.org/orc-scripts',
npm verb headers   server: 'cloudflare',
npm verb headers   'cf-ray': '421f611334943cef-CPH' }
npm info lifecycle orc-scripts@0.3.22~publish: orc-scripts@0.3.22
npm info lifecycle orc-scripts@0.3.22~postpublish: orc-scripts@0.3.22

npm login fails with

npm ERR! code E301
npm ERR! Registry returned 301 for POST on http://registry.npmjs.org/-/v1/login
gertsonderby commented 6 years ago

And there we have it: This is a failure mode when your registry is entered with an http:// protocol, instead of https://.

Check your config, .npmrc file, etc.

StarpTech commented 6 years ago

Damn, thank you @gertsonderby and horrible error management by npm. This should be open.

robhogan commented 6 years ago

npm config set registry https://registry.npmjs.org will set the registry to what you (probably) want it to be. Obviously an error handling bug though.