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

Cannot resolve modules 'stack-source-map' and 'webpack-hot-middleware' #65

Closed
davidxmoody opened this issue Apr 6, 2016 · 1 comment

Comments

@davidxmoody
Copy link

Hi, after installing react-storybook for the first time and trying to run it I always get the following errors:

ERROR in multi admin
Module not found: Error: Cannot resolve module 'stack-source-map/register' in /home/dmoody/p/mhb
 @ multi admin

ERROR in multi preview
Module not found: Error: Cannot resolve module 'stack-source-map/register' in /home/dmoody/p/mhb
 @ multi preview

ERROR in multi preview
Module not found: Error: Cannot resolve module 'webpack-hot-middleware/client' in /home/dmoody/p/mhb
 @ multi preview

Explicitly installing them (with npm install --save-dev stack-source-map webpack-hot-middleware) fixes the problem.

I'm not exactly sure where the problem is coming from as they are both listed as dependencies of react-storybook. My guess is that they are needed by webpack which is looking for them in the node_modules of the root of the project but they are actually in node_modules/@kadira/storybook/node_modules. I'm using npm v2 and I think maybe npm v3 would put them all in the main node_modules dir.

Not sure if there is an easy fix or if you are just going to say I should upgrade to npm v3. I still thought I'd raise an issue though.

@arunoda
Copy link
Member

arunoda commented Apr 6, 2016

Yes. That's true. It's because of NPM3. I think we should specifically mention this is only for NPM3. I'll try to do it.

Thanks for informing. This is an known issue.

@arunoda arunoda closed this as completed Apr 6, 2016
ndelangen pushed a commit that referenced this issue Apr 5, 2017
ndelangen pushed a commit that referenced this issue Apr 5, 2017
ndelangen pushed a commit that referenced this issue Apr 5, 2017
Add focusInInput check to key_events `handle`
ndelangen pushed a commit that referenced this issue Apr 5, 2017
docs: Fix storyshots import
ndelangen pushed a commit that referenced this issue Apr 5, 2017
ndelangen added a commit that referenced this issue Apr 11, 2017
Fix typo in writing stories page.
ndelangen pushed a commit that referenced this issue Feb 23, 2024
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

2 participants