storybook: Getting 404 Registry returned when trying to run `npm install`
Edited by @ndelangen:
I can see quite a bit of traffic to this issue, so I hope by editing this first message I will save a lot of people some time.
This problem occurs for companies that must use private npm proxies, mostly old ones do not properly support npm organisations. Or they are configured to not support them. An example would be artifactory.
Notify your support team about it to get support. More and more open source will eventually (have to) migrate to organisations because the global registry is getting crowded and package names are being squated.
But understandable you want a solution now,
This solution will likely work for you:
create a
.npmrc-file in the root of your project (or higher in the directory-tree) with:@storybook:registry=https://registry.npmjs.org/
If you’re on a version of storybook lower than 3 you should use: @kadira:registry=https://registry.npmjs.org/
If the .npmrc file already exists, you can just append to the bottom of the file.
Since storybook has some dependencies in other npm-organisations like @types, you will probably need to add those as well.
@types:registry=https://registry.npmjs.org/
Original message:
Simply cloned your repo and ran npm install and got the error:
npm ERR! 404 Registry returned 404 for GET on https://npm-proxy.fury.io/C__hqNZ_HngaWmEnB-ps/massdrop/@kadira%2fstorybook
npm ERR! 404
npm ERR! 404 '@kadira/storybook' is not in the npm registry.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 7
- Comments: 32 (13 by maintainers)
Commits related to this issue
- Merge pull request #15 from lorensr/patch-1 Fix "emojies" typo — committed to storybookjs/storybook by arunoda 8 years ago
- Merge pull request #15 from kadirahq/refactor-panel Refactor panel — committed to storybookjs/storybook by arunoda 8 years ago
- Merge pull request #15 from kadirahq/greenkeeper-@kadira/storybook-2.20.1 @kadira/storybook@2.20.1 untested ⚠️ — committed to storybookjs/storybook by mnmtanish 8 years ago
- Merge pull request #15 from storybooks/delete-dist-sourcecontrol DELETE dist — committed to storybookjs/storybook by ndelangen 7 years ago
- Support background-images (#15) * Removed the specificity of `backgroundColor` for a more inclusive `background` Signed-off-by: Blake Stephens <blake.stephens@lge.com> * Updated styles type definit... — committed to storybookjs/storybook by deleted user 8 years ago
Yea, I was using sinopia. Doing a
npm set registry https://registry.npmjs.org/solved the problem.Great, thank you. This helped:
You can override the registry for specific scopes, if that’s the easiest workaround. For example:
npm config set @types:registry https://registry.npmjs.org/That would tell npm to always get anything for the @types scope directly from the official server on the internet, bypassing Sinopia entirely. Obviously it won’t be the right fix for everyone. npm would need internet access (via a proxy if necessary) and there won’t be any centralised caching.
Same
First Run:
Next:
Cheers!
Setting the registry unfortunately hasn’t fixed it for me. 😦
Also adding the github url in
package.jsonleads to the same result."@kadira/storybook": "https://github.com/kadirahq/react-storybook.git#v1.1.0"I suppose, I’m still somehow holding it wrong.
This is a problem for companies that must use private npm proxies, we can’t just switch to using global. If there isn’t a specific reason for using scopes would appreciate you publishing non-scoped.
Using github repo URL also seems broken with proxies due to the internal scoped dependencies you use:
npm ERR! 404 Registry returned 404 for GET on https://npm-proxy.fury.io/________/@kadira%2fstorybook-uiCheck this issue as well: https://github.com/kadirahq/react-storybook/issues/122
Thanks @arunoda
That didn’t fix my problem but I was able to fix it by explicitly upgrading npm to version
3.8.6by runningnpm update npm -g. Now I can install it correctly withnpm i --save-dev @kadira/storybook.The version of npm that did not work was
3.8.3.I think it was a bug with npm itself.
cc: @robin-drexler
@nrempel @robin-drexler
You you can get if from the github like this:
I had to publish the
distdirectory to github in order to enable this.Has this issue been fixed? I’m having the same issue as @robin-drexler
@gthomas-appfolio that did the trick for me thanks a lot ❤️
Put your auth token into local .npmrc (the .npmrc file inside the repository folder), not into the global one.
For folks that are on npm 2.x I ran into this issue and found that npm
2.15.1will fail but after upgrading to2.15.3everything is working.I hope we are good here. Hope there’s nothing we can do for this. I’ll add this into the README, if someone got this error.
Is it possible for you guys to use the official mirror. If not directly install from github.