Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Add support for Node 4 #6

Closed
gaearon opened this issue Aug 2, 2016 · 4 comments
Closed

Add support for Node 4 #6

gaearon opened this issue Aug 2, 2016 · 4 comments

Comments

@gaearon
Copy link

gaearon commented Aug 2, 2016

Node 4 is the stable version so many people use that. It comes with npm 2 so tree isn't flat.
This is the output I get:

npm run storybook

> [email protected] storybook /Users/gaearon/p/test
> start-storybook -p 9009


React Storybook started on => http://localhost:9009/

webpack built 8075a01bcca1d6c58491 in 56ms
Hash: 8075a01bcca1d6c58491
Version: webpack 1.13.1
Time: 56ms
                   Asset     Size  Chunks             Chunk Names
static/preview.bundle.js  22.7 kB       0  [emitted]  preview
static/manager.bundle.js  22.4 kB       1  [emitted]  manager
chunk    {0} static/preview.bundle.js (preview) 64 bytes [rendered]
    [0] multi preview 64 bytes {0} [built] [4 errors]
chunk    {1} static/manager.bundle.js (manager) 40 bytes [rendered]
    [0] multi manager 40 bytes {1} [built] [2 errors]

ERROR in multi preview
Module not found: Error: Cannot resolve module 'webpack-hot-middleware/client' in /Users/gaearon/p/test
 @ multi preview

ERROR in multi preview
Module not found: Error: Cannot resolve module 'babel' in /Users/gaearon/p/test
 @ multi preview

ERROR in multi manager
Module not found: Error: Cannot resolve module 'babel' in /Users/gaearon/p/test
 @ multi manager

ERROR in multi preview
Module not found: Error: Cannot resolve module 'babel' in /Users/gaearon/p/test
 @ multi preview

ERROR in multi preview
Module not found: Error: Cannot resolve module 'babel' in /Users/gaearon/p/test
 @ multi preview

ERROR in multi manager
Module not found: Error: Cannot resolve module 'babel' in /Users/gaearon/p/test
 @ multi manager

We had to put a bunch of require.resolves in Create React App to work around this.

@arunoda
Copy link
Contributor

arunoda commented Aug 3, 2016

This is kind a feature/issue from the early days of storybook. I hope react-scripts support NPM2. I should have a look at how it's done.

@gaearon
Copy link
Author

gaearon commented Aug 3, 2016

Yes, we support npm 2. require.resolve is the way to go.

@arunoda
Copy link
Contributor

arunoda commented Aug 3, 2016

Cool. I will add them by today.

@arunoda
Copy link
Contributor

arunoda commented Aug 5, 2016

We released a new version of React Storybook with the NPM2 support.
Thanks a lot for the input :)

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

No branches or pull requests

2 participants