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

Getting 404 Registry returned when trying to run npm install #15

Closed
tedlin182 opened this issue Apr 1, 2016 · 32 comments
Closed

Getting 404 Registry returned when trying to run npm install #15

tedlin182 opened this issue Apr 1, 2016 · 32 comments

Comments

@tedlin182
Copy link

tedlin182 commented Apr 1, 2016

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.
@luandro
Copy link

luandro commented Apr 1, 2016

Same

@arunoda
Copy link
Member

arunoda commented Apr 1, 2016

This is a scoped NPM package. I hope that's not available on mirrors yet or something.

@arunoda
Copy link
Member

arunoda commented Apr 1, 2016

Is it possible for you guys to use the official mirror. If not directly install from github.

@tedlin182
Copy link
Author

@arunoda - Sorry, mind if you explain more of what you mean?

@arunoda
Copy link
Member

arunoda commented Apr 1, 2016

@tedlin182 it seems like you are using fury.io as the NPM mirror.
May be to support private modules.

They seems not support scoped NPM modules. Starting with @.

Just contact them and verify.
As a quick fix, use our github repo URL as the package version. Then it get the module via NPM.

@luandro
Copy link

luandro commented Apr 2, 2016

Yea, I was using sinopia. Doing a npm set registry https://registry.npmjs.org/ solved the problem.

@arunoda
Copy link
Member

arunoda commented Apr 2, 2016

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.

@arunoda
Copy link
Member

arunoda commented Apr 2, 2016

It's great to reopen this since a few people seems to have this issue. Keeping this in the issue list will help them to see this.

@arunoda arunoda reopened this Apr 2, 2016
@robin-drexler
Copy link

Setting the registry unfortunately hasn't fixed it for me. :(

$ npm set registry https://registry.npmjs.org/
$ npm i --save-dev @kadira/storybook
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "--save-dev" "@kadira/storybook"
npm ERR! node v5.10.0
npm ERR! npm  v3.8.3

npm ERR! Invalid name: "@kadira/storybook"

Also adding the github url in package.json leads 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.

@nrempel
Copy link

nrempel commented Apr 5, 2016

Has this issue been fixed? I'm having the same issue as @robin-drexler

@arunoda
Copy link
Member

arunoda commented Apr 5, 2016

@nrempel @robin-drexler

You you can get if from the github like this:

"@kadira/storybook": "https://github.com/kadirahq/react-storybook.git"

I had to publish the dist directory to github in order to enable this.

@nrempel
Copy link

nrempel commented Apr 6, 2016

Thanks @arunoda

That didn't fix my problem but I was able to fix it by explicitly upgrading npm to version 3.8.6 by running npm update npm -g. Now I can install it correctly with npm 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

@agilliland
Copy link

For folks that are on npm 2.x I ran into this issue and found that npm 2.15.1 will fail but after upgrading to 2.15.3 everything is working.

@tomitrescak
Copy link
Contributor

Would you consider to publish this as non scoped package?
With the scoped name I cannot use the amazing pnpm substitute of npm project that saves soo much space with creating symlinks instead of having a copy of storybook in each project.

I have 13 packages that use storybook. Each package copies over 500MB and 300.000+ files just because of the storybook. This is hell for the cloud backup and more. Thanks!

@arunoda
Copy link
Member

arunoda commented Jun 16, 2016

We choose scoped packages for a reason to avoid global name collision (ref: the left-pad story). So, we are unlikely to change that.

But, we do realize the pain.

@oskarhane
Copy link

Im having the Invalid name: "@kadira/storybook" issue.
Same error when I npm i --save-dev @kadira/storybook or just add it to package.json with "@kadira/storybook": "https://github.com/kadirahq/react-storybook.git".

I've tried with node 5.11.1 (npm 3.8.6) and 6.2.2 (npm 3.9.5).
The registry I use is https://registry.npmjs.org/.

On OS X.

I don't think it's a duplicate of this issue, but issues like #22 is referring to this one.

Any ideas?

@arunoda
Copy link
Member

arunoda commented Aug 3, 2016

Seems like something like this: npm/npm#10344
This will tell me to move this package to something like react-storybook.

@arunoda
Copy link
Member

arunoda commented Sep 15, 2016

There's nothing we can do about this issue.

@gthomas-appfolio
Copy link

gthomas-appfolio commented Sep 22, 2016

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-ui

@arunoda
Copy link
Member

arunoda commented Sep 23, 2016

Hey, most of the private repositories now supports scoped modules.

Try their docs.

@arunoda
Copy link
Member

arunoda commented Sep 23, 2016

Check this issue as well: #122

@gthomas-appfolio
Copy link

Great, thank you. This helped:

The solution is to set a registry for modules of specific scope. You can add the following to your project's .npmrc file

@kadira:registry=https://registry.npmjs.org

@ufukomer
Copy link

ufukomer commented Oct 6, 2016

Put your auth token into local .npmrc (the .npmrc file inside the repository folder), not into the global one.

//registry.npmjs.org/:_authToken=00000000-0000-0000-0000-000000000000

@augbog
Copy link

augbog commented Dec 7, 2016

@gthomas-appfolio that did the trick for me thanks a lot <3

@VamsiKonanki
Copy link

First Run:

npm cache clean

Next:

npm rebuild

Cheers!

@anhdn
Copy link

anhdn commented Jun 14, 2017

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.

@mbraint
Copy link

mbraint commented Jun 29, 2017

Also, name in pakage.json , should have scope:
"name": "@scope/name"
This help me resolve this issues.

@BYazdaani
Copy link

hi
for me npm cache clean
and
npm rebuild
worked
thanks

ndelangen pushed a commit that referenced this issue Nov 2, 2017
* Removed the specificity of `backgroundColor` for a more inclusive `background`

Signed-off-by: Blake Stephens <blake.stephens@lge.com>

* Updated styles type definition too
Oops. Not too familiar with typescript

Signed-off-by: Blake Stephens <blake.stephens@lge.com>

* Updated test too
Thanks Travis.

Signed-off-by: Blake Stephens <blake.stephens@lge.com>
@ade-adisa
Copy link

Just run either of the below commands in terminal

  sudo sysctl -w kern.maxfiles=5242880
  sudo sysctl -w kern.maxfilesperproc=524288

@suhas777
Copy link

Initially I tried with "npm set registry https://registry.npmjs.org" (without quotes) and it didnt work. Later I tried with npm set registry https://registry.npmjs.org/ and it worked. "/" MATTERS

@ndelangen
Copy link
Member

Thank you @suhas777 I've updated the first post to match. 👏

@b1ueRa1n
Copy link

@arunoda Thank you very much! You are right, I am use the official mirror.

@storybookjs storybookjs locked as resolved and limited conversation to collaborators Apr 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests