Storybook: Unable to Install Dependencies with getstorybook: "node-logger" and "react-stubber" not found

Created on 28 Jul 2018  Â·  14Comments  Â·  Source: storybookjs/storybook

Bug or support request summary

The title says it all. When I run getstorybook from my app's root, I get an error messages saying that @storybook/[email protected] and @storybook/react-stubber@^1.0.0 cannot be found and so I can't use storybook.

Steps to reproduce

I'm not sure what is causing this (hence this post) so I have no idea how you'd reproduce it. All that I'm doing is attempting to run getstorybook (after having run npm -g i @storybook/cli, of course). Some other things that might be notable are that I'm using node v8.11.1 and 0.55.3.

Storybook devDependencies in my package.json (all added automatically when I used getstorybook)

  • "@storybook/react-native": "^3.4.8",
  • "@storybook/addon-actions": "^3.4.8",
  • "@storybook/addon-links": "^3.4.8",
  • "@storybook/addons": "^3.4.8",

Affected platforms

React native v0.55.3
Node v8.11.1

Screenshots / Screencast / Code Snippets (Optional)

This is the entire output:

$ getstorybook

 getstorybook - the simplest way to add a storybook to your project. 

 • Detecting project type. ✓
 • Adding storybook support to your "React Native" app. ✓
 • Preparing to install dependencies. ✓

yarn install v1.6.0
[1/4] 🔍  Resolving packages...
warning @storybook/react-native > @storybook/core > autoprefixer > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @storybook/react-native > @storybook/core > css-loader > cssnano > autoprefixer > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning @storybook/react-native > @storybook/core > css-loader > cssnano > postcss-merge-rules > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
error Couldn't find package "@storybook/[email protected]" required by "@storybook/[email protected]" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
warning @storybook/react-native > @storybook/core > css-loader > cssnano > postcss-merge-rules > caniuse-api > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
Error: Couldn't find package "@storybook/react-stubber@^1.0.0" required by "@storybook/react-komposer@^2.0.3" on the "npm" registry.
    at MessageError.ExtendableBuiltin (/usr/local/lib/node_modules/yarn/lib/cli.js:237:66)
    at new MessageError (/usr/local/lib/node_modules/yarn/lib/cli.js:266:123)
    at PackageRequest.<anonymous> (/usr/local/lib/node_modules/yarn/lib/cli.js:36410:17)
    at Generator.throw (<anonymous>)
    at step (/usr/local/lib/node_modules/yarn/lib/cli.js:98:30)
    at /usr/local/lib/node_modules/yarn/lib/cli.js:111:13
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

 • Installing dependencies. ✖

     An error occurred while installing dependencies.

Acceptance criteria

I just want to use storybook :(

react-native question / support

Most helpful comment

I had this error too and fixed it by performing the following command, as detailed here:

npm config delete _auth

This was okay for me to run as I currently don't access any other package registries besides npm.

All 14 comments

I had this error too and fixed it by performing the following command, as detailed here:

npm config delete _auth

This was okay for me to run as I currently don't access any other package registries besides npm.

Didn't work for me, unfortunately. And just to clarify, when you say you don't access any other package registries you are only referring to the scope of your project right?

Yes, which I mentioned since I didn't want to mess up someone's npm setup. You could try running the following command and let me know what gets printed: npm config get registry.

I have the same issue, but not on my local machine, just on Travis CI.

If I try to run npm install with Travis when I have this package in my devDependencies: "@storybook/react": "4.0.0-alpha.14", (I tried with any version from 0 to 14 after alpha) it gives me the same error as mentioned in the issue:

npm ERR! code E404

npm ERR! 404 Not Found: @storybook/[email protected]


npm ERR! A complete log of this run can be found in:

If I remove this dep, the install runns, but ofcourse, I need that package to run the storybook.

The only registry listed for me is https://registry.npmjs.org/. Checks out. Those packages look just fine on npmjs.org, and there is no npm outage. Pretty bizarre.

Similar problem here, using a private registry (artifactory). For some unknown reason, artifactory gives a 404 for any version of @storybook/node-logger after 3.4.0-alpha.9. I have not seen this issue with any other npm package. Forcing it to use the npmjs registry works, but is not allowed where I work.

I got the same error as @spudly . We also use an artifactory, and get the errors especially for the node-logger.

Same here (artifactory)

Seems like a bug with Artifactory and/or yarn and not storybook

@idolizesc what makes you say that? Anything in particular, or just based on our comments here?

Fixed my issue.

I guess the npm registry has a bug where they sometimes respond to a HEAD request with a 404 for packages that exist. This breaks artifactory, so you have to tell artifactory to ignore it.

See:

Well, I finally solved it. I tried a lot of stuff––cleaning caches, scouring through .rc files, changing and updating versions. Nothing. I eventually got fed up and just reinstalled npm completely, and now yarn + npm are working fine. Oh well. Unfortunately I can't offer a helpful diagnosis, but boy am I glad to be past this.

I can verify the package is on npm:

> $ npm info @storybook/node-logger                            [±feature/add-navbar ●●]

{ name: '@storybook/node-logger',
  description: '[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook) [![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/re',
  'dist-tags': { latest: '3.4.10', alpha: '4.0.0-alpha.16', rc: '3.4.0-rc.4' },
  versions:
   [ '3.3.0-alpha.5',
     '3.3.0-alpha.6',
     '3.3.0-rc.0',
     '3.3.0-rc.1',
     '3.3.0',
     '3.3.1',
     '3.3.2',
     '3.3.3',
     '3.3.4',
     '3.3.5',
     '3.3.6',
     '3.3.7',
     '3.3.8',
     '3.3.9',
     '3.3.10',
     '3.3.11',
     '3.3.12',
     '3.3.13',
     '3.3.14',
     '3.3.15',
     '3.4.0-alpha.0',
     '3.4.0-alpha.1',
     '3.4.0-alpha.2',
     '3.4.0-alpha.3',
     '3.4.0-alpha.4',
     '3.4.0-alpha.5',
     '3.4.0-alpha.6',
     '3.4.0-alpha.7',
     '3.4.0-alpha.8',
     '3.4.0-alpha.9',
     '3.4.0-rc.0',
     '3.4.0-rc.1',
     '3.4.0-rc.2',
     '3.4.0-rc.3',
     '3.4.0-rc.4',
     '3.4.0',
     '3.4.1',
     '3.4.2',
     '3.4.3',
     '3.4.4',
     '3.4.5',
     '3.4.6',
     '3.4.7',
     '3.4.8',
     '3.4.10',
     '4.0.0-alpha.0',
     '4.0.0-alpha.1',
     '4.0.0-alpha.2',
     '4.0.0-alpha.3',
     '4.0.0-alpha.4',
     '4.0.0-alpha.6',
     '4.0.0-alpha.7',
     '4.0.0-alpha.8',
     '4.0.0-alpha.9',
     '4.0.0-alpha.10',
     '4.0.0-alpha.11',
     '4.0.0-alpha.12',
     '4.0.0-alpha.13',
     '4.0.0-alpha.14',
     '4.0.0-alpha.15',
     '4.0.0-alpha.16' ],
  maintainers:
   [ 'alexandrebodin <[email protected]>',
     'arunoda <[email protected]>',
     'danielduan <[email protected]>',
     'hypnosphi <[email protected]>',
     'igor-dv <[email protected]>',
     'mnmtanish <[email protected]>',
     'ndelangen <[email protected]>',
     'shilman <[email protected]>',
     'tvs <[email protected]>',
     'usulpro <[email protected]>' ],
  time:
   { modified: '2018-08-06T14:27:03.386Z',
     created: '2017-12-23T17:22:26.593Z',
     '3.3.0-alpha.5': '2017-12-23T17:22:26.593Z',
     '3.3.0-alpha.6': '2017-12-23T17:26:44.316Z',
     '3.3.0-rc.0': '2017-12-24T04:21:29.001Z',
     '3.3.0-rc.1': '2017-12-26T17:50:10.470Z',
     '3.3.0': '2017-12-26T23:58:55.389Z',
     '3.3.1': '2017-12-27T03:31:20.531Z',
     '3.3.2': '2017-12-28T03:12:06.780Z',
     '3.3.3': '2017-12-28T17:07:18.454Z',
     '3.3.4': '2018-01-07T12:56:05.096Z',
     '3.4.0-alpha.0': '2018-01-07T16:05:30.597Z',
     '3.3.5': '2018-01-08T03:43:23.745Z',
     '3.3.6': '2018-01-08T10:43:01.178Z',
     '3.3.7': '2018-01-10T06:37:03.296Z',
     '3.4.0-alpha.1': '2018-01-10T07:09:13.072Z',
     '3.3.8': '2018-01-11T12:18:32.440Z',
     '3.4.0-alpha.2': '2018-01-11T12:47:25.899Z',
     '3.3.9': '2018-01-13T07:36:35.342Z',
     '3.4.0-alpha.3': '2018-01-13T12:42:21.871Z',
     '3.4.0-alpha.4': '2018-01-13T13:05:08.306Z',
     '3.3.10': '2018-01-19T11:28:42.281Z',
     '3.4.0-alpha.5': '2018-01-19T12:53:09.314Z',
     '3.3.11': '2018-01-27T06:41:23.156Z',
     '3.4.0-alpha.6': '2018-01-27T07:16:57.434Z',
     '3.3.12': '2018-02-03T02:24:09.796Z',
     '3.4.0-alpha.7': '2018-02-03T02:55:35.724Z',
     '3.3.13': '2018-02-11T06:13:14.132Z',
     '3.4.0-alpha.8': '2018-02-11T06:58:09.006Z',
     '3.3.14': '2018-02-21T08:39:18.351Z',
     '3.4.0-alpha.9': '2018-02-22T08:46:06.376Z',
     '3.3.15': '2018-03-07T09:57:30.349Z',
     '3.4.0-rc.0': '2018-03-08T03:04:21.585Z',
     '3.4.0-rc.1': '2018-03-13T10:35:00.325Z',
     '3.4.0-rc.2': '2018-03-13T11:00:33.173Z',
     '3.4.0-rc.3': '2018-03-19T23:04:06.934Z',
     '3.4.0-rc.4': '2018-03-29T04:25:45.460Z',
     '4.0.0-alpha.0': '2018-03-29T05:33:58.661Z',
     '4.0.0-alpha.1': '2018-03-29T15:28:34.982Z',
     '3.4.0': '2018-03-30T23:44:16.258Z',
     '3.4.1': '2018-04-10T22:33:32.958Z',
     '4.0.0-alpha.2': '2018-04-11T00:40:45.707Z',
     '3.4.2': '2018-04-17T23:13:45.136Z',
     '4.0.0-alpha.3': '2018-04-17T23:51:23.796Z',
     '3.4.3': '2018-04-27T19:08:50.059Z',
     '4.0.0-alpha.4': '2018-04-27T19:45:16.991Z',
     '3.4.4': '2018-05-12T19:47:52.718Z',
     '4.0.0-alpha.6': '2018-05-12T20:33:22.892Z',
     '3.4.5': '2018-05-17T22:12:19.322Z',
     '4.0.0-alpha.7': '2018-05-17T23:03:45.907Z',
     '3.4.6': '2018-05-27T00:39:02.798Z',
     '4.0.0-alpha.8': '2018-05-27T01:48:12.424Z',
     '3.4.7': '2018-06-10T04:28:55.302Z',
     '4.0.0-alpha.9': '2018-06-10T07:42:59.923Z',
     '3.4.8': '2018-06-21T13:03:28.183Z',
     '4.0.0-alpha.10': '2018-06-21T13:49:55.657Z',
     '4.0.0-alpha.11': '2018-07-02T18:14:52.680Z',
     '4.0.0-alpha.12': '2018-07-03T22:59:17.391Z',
     '4.0.0-alpha.13': '2018-07-10T04:32:47.659Z',
     '4.0.0-alpha.14': '2018-07-12T00:14:43.225Z',
     '3.4.10': '2018-08-03T09:26:36.680Z',
     '4.0.0-alpha.15': '2018-08-03T09:57:29.212Z',
     '4.0.0-alpha.16': '2018-08-06T14:27:00.289Z' },
  license: 'MIT',
  readmeFilename: '',
  version: '3.4.10',
  main: 'dist/index.js',
  'jsnext:main': 'src/index.js',
  scripts: { prepare: 'node ../../scripts/prepare.js' },
  dependencies: { npmlog: '^4.1.2' },
  dist:
   { integrity: 'sha512-r6f5UMf7wHFuDYZFQRzBCUoAvQbVh3OprHxupWmbRwZbzPllp+v8klReeeDA9i4HVckrTlNt05rlVe1ToU2lFQ==',
     shasum: 'b89b7008a7d98b28530920a178ec77bde2ab97cc',
     tarball: 'https://registry.npmjs.org/@storybook/node-logger/-/node-logger-3.4.10.tgz',
     fileCount: 6,
     unpackedSize: 4425,
     'npm-signature': '-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZB/NCRA9TVsSAnZWagAAnsQQAJSVixchMgfI99G3mui2\n2VT61WipUC/9uEWKNPz5rDj65lFgTYj+1raOL6XZxaFL4ZYhd9lF8M6nYCLT\n1thrrSfW4cVtCVKMk6RLOZbGyUf34S70XpLN0sSsHYwzuILXCXbItcsdbwVm\nJK4aEVyNA5rEppb3cXXUVW+JDlEL3HoekXZKs62ayh4oE04r6IL5eGG1wg+J\nwuTv7q5CVLYN0+xI3J6PMCK5J3BSm9hAHLtLBv1b3vGZz0FDKzfEYzW6VjGX\nDoemk2PkllB8zheE/4fmXiIEmulemZHwV7V9UpjxxbLlbd0UPWMhi94W1Gdd\nnPiRkuz+n8XEi1JWrvRhrCV5zFaqHpb4skRHgLl2G/mlPxf0fKuTPzbMOdQd\nvWDbLa1m8khaek5an/fzB7AM6+lVG7FgDoXimkcrMOvKn078sQ/o6c7kDv4R\ncNDLZlcQySask2KtVC7Lzb+7EeLAjTDOZNmTA/S1SWceNwl9yeUoerzNZi1j\nKVRVLOoGY1nTL4t+s3Dg5/P5PAZrpiD++u6eYgvbUUfXLTdK93lz0qaz1WeR\nplbz190M2Ei/elGg4Wf7PvhlZo/NC/A2xdreCj5DNbBuCkKRpWeJEIfJb4uj\nMQpRp5+NPfITMaOvbtVxFx4wS+ZHDqunxSSFR7SGxhh7Jd0XCi0A7N/zxxPv\nWQZ1\r\n=tCfH\r\n-----END PGP SIGNATURE-----\r\n' },
  directories: {} }

I'm unsure if there's anything I can do here. There must be some infrastructural problem at npm or somewhere in between you and npm if you're experiencing this problem.

@spudly seems to have detected such issue. https://github.com/storybooks/storybook/issues/3929#issuecomment-409645518

Please let me know if there's anything I can do on our part to help resolve this.

In addition to @spudly's reply you can try this:

We had our private packages scoped to @companyname on artifactory. Replace myname and mycompany in all the places below. Notice that this allows you to have a personal npm account but still prefer artifactory for @companyname scoped packages. You might have to replace npm/npm with whatever your artifactory virtual repository is but for ours we just used npm/npm and then our remote and local repos have -remote and -local in the names respectively. Virtual repos might be what are looking for too since they allow for one scoped packages and one mirror of public npm to come together under a single virtual repo.

Each of our users use this config:

init.author.name=My Name
[email protected]
init.author.url=http://github.com/myname
init.license=MIT
always-auth=true
@mycompany:registry=https://MYCOMPANY.jfrog.io/MYCOMPANY/api/npm/npm/
//MYCOMPANY.jfrog.io/MYCOMPANY/api/npm/npm/:_password=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//MYCOMPANY.jfrog.io/MYCOMPANY/api/npm/npm/:username=myname
//MYCOMPANY.jfrog.io/MYCOMPANY/api/npm/npm/:[email protected]
//MYCOMPANY.jfrog.io/MYCOMPANY/api/npm/npm/:always-auth=true
//registry.npmjs.org/:_authToken=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Was this page helpful?
0 / 5 - 0 ratings

Related issues

wahengchang picture wahengchang  Â·  3Comments

xogeny picture xogeny  Â·  3Comments

levithomason picture levithomason  Â·  3Comments

alexanbj picture alexanbj  Â·  3Comments

zvictor picture zvictor  Â·  3Comments