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

Error installing 1.28.1 #218

Closed
gbylenok opened this issue May 27, 2016 · 5 comments
Closed

Error installing 1.28.1 #218

gbylenok opened this issue May 27, 2016 · 5 comments

Comments

@gbylenok
Copy link

I am trying to use the latest storybook and have run into a few issues that I wanted to run by someone here. Everything worked fine a couple of weeks ago, but then I upgraded to npm 3.x and tried to grab the latest storybook code.

I tried to keep the package.json simple, like this:

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

but always received errors like this upon "npm install":

npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.11.1
npm ERR! npm  v3.8.6
npm ERR! code E404

npm ERR! 404 no such package available : @kadira/storybook-core
npm ERR! 404 
npm ERR! 404  '@kadira/storybook-core' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of '@kadira/storybook'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

So I tried to expand the list of dependencies in package.json to this:

"@kadira/react-split-pane": "https://github.com/kadirahq/react-split-pane.git",

"@kadira/storybook-core": "https://github.com/kadirahq/storybook-ui.git",

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

That allowed me to at least download the packages and start up storybook. However, upon starting, I got a further error:

  [323] ./~/@kadira/storybook/dist/manager.js 257 kB {1} [built]

ERROR in ./~/@kadira/storybook/dist/client/preview/init.js
Module not found: Error: Cannot resolve module '@kadira/storybook-core/dist/libs/key_events'
in /Users/foo/code/i95/web/client/node_modules/@kadira/storybook/dist/client/preview
 @ ./~/@kadira/storybook/dist/client/preview/init.js 29:18-72

Checking init.js, it appears to be pointing to a directory in storybook-core that doesn't really exist. Do you think this is an issue with this distribution, or am I doing something wrong?

Thanks for any assistance. React Storybook is a great tool, and it would be great to see it working again!

@thani-sh
Copy link
Contributor

thani-sh commented May 28, 2016

Please use storybook module from npm.

"@kadira/storybook": "^1.28.1",

We're using the prepublish hook to transpile ES6 code to ES5. That is why you're getting the "Module not found" error. Anyways we don't recommend using storybook from Github because the code changes often.

@arunoda
Copy link
Member

arunoda commented May 28, 2016

@mnmthanish it should be possible to refer GitHub as the source as well.

May be we need to publish the dist directory of split-pane and mantra-core into GitHub.

@thani-sh
Copy link
Contributor

@gbylenok @arunoda

Published lib, dist directories in react-split-pane and storybook-core packages.
Github installations will work from now.

Tip:
No need to enter the complete url for Github sources, user/repo will also work.
https://docs.npmjs.com/files/package.json#github-urls

"dependencies": {
  "@kadira/storybook": "kadirahq/react-storybook",
}

@gbylenok
Copy link
Author

Thank you! I have verified that the install works from github. I could never get it to work from our private npm registry, so that's why I went the github route.

@arunoda
Copy link
Member

arunoda commented May 31, 2016

Great work guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants