"npm run storybook" fails after updating storybook
See original GitHub issueI updated storybook from:
"@storybook/addon-info": "^3.1.6",
"@storybook/addon-knobs": "^3.1.8",
"@storybook/addon-options": "^3.1.6",
"@storybook/react": "^3.1.8",
to:
"@storybook/addon-info": "^3.2.9",
"@storybook/addon-knobs": "^3.2.8",
"@storybook/addon-options": "^3.2.6",
"@storybook/react": "^3.2.8",
Now I get the following error:
@ storybook <PATH_TO_PROJECT>
> start-storybook -p 6006
@storybook/react v3.2.8
=> Loading custom addons config.
=> Loading custom webpack config (extending mode).
10% building modules 8/12 modules 4 active ...react/dist/client/manager/provider.js(node:56466) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
92% chunk asset optimization<PATH_TO_PROJECT>/node_modules/source-list-map/lib/SourceListMap.js:29
} else if(generatedCode.getMappings && generatedCode.getGeneratedCode) {
^
TypeError: Cannot read property 'getMappings' of undefined
at SourceListMap.add (<PATH_TO_PROJECT>/node_modules/source-list-map/lib/SourceListMap.js:29:25)
at <PATH_TO_PROJECT>/node_modules/@storybook/react/node_modules/webpack-sources/lib/ConcatSource.js:48:9
at Array.forEach (<anonymous>)
at ConcatSource.listMap (<PATH_TO_PROJECT>/node_modules/@storybook/react/node_modules/webpack-sources/lib/ConcatSource.js:44:17)
at <PATH_TO_PROJECT>/node_modules/@storybook/react/node_modules/webpack-sources/lib/ConcatSource.js:48:18
at Array.forEach (<anonymous>)
at ConcatSource.listMap (<PATH_TO_PROJECT>/node_modules/@storybook/react/node_modules/webpack-sources/lib/ConcatSource.js:44:17)
at ConcatSource.proto.sourceAndMap (<PATH_TO_PROJECT>/node_modules/@storybook/react/node_modules/webpack-sources/lib/SourceAndMapMixin.js:25:16)
at CachedSource.sourceAndMap (<PATH_TO_PROJECT>/node_modules/@storybook/react/node_modules/webpack-sources/lib/CachedSource.js:56:31)
at getTaskForFile (<PATH_TO_PROJECT>/node_modules/@storybook/react/node_modules/webpack/lib/SourceMapDevToolPlugin.js:33:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ storybook: `start-storybook -p 6006`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ storybook script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/<USER>/.npm/_logs/2017-09-07T21_04_08_504Z-debug.log
I’m suspecting that I have some outdated dependency or something. But I’m really not an expert yet and would appreciate if anybody point me in a direction. I spent some time updating outdated dependencies, but it didn’t help. I also couldn’t figure out how to find out which of MY dependencies use this “Source-List-Map” so that I could decide which of my dependencies may need an upgrade.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
@storybook/builder-webpack5 - npm
Builder implemented with webpack5 and webpack5 -compatible loaders/plugins/config, used by @storybook/core-server to build the preview iframe.
Read more >Bug #26098: Stroybook doesn't work locally - Foreman
when running `npm run stroybook` this error might occur: npm run storybook > TheForemanDevDeps@1.22.0 storybook /home/ares/Projekty/Zdrojaky/foreman ...
Read more >storybook fails to start after upgrade angular - Stack Overflow
it seems Angular 14 is only supported from storybook version 7.0.0-alpha.0 so you would probably want to use test version in your project, ......
Read more >CLI options - Storybook
Storybook comes with two CLI utilities: start-storybook and build-storybook . Storybook collects completely anonymous data to help us improve user ...
Read more >Storybook build fails with "Cannot find module 'webpack/lib/util ...
js" after upgrading storybook packages to 6.3.0 #15336. ismay posted onGitHub. Describe the bug start-storybook and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Wanted to leave a note here, in case any other developer stumbles on the “exports is not defined” problem. The fix for me was modifying babel-preset-env.
My babel config went from:
to:
Which I came to after looking at https://github.com/storybooks/storybook/pull/1668/files.
{"modules": false}This is actually the thing you should do anyway if you’re using webpack 2+