You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have migrated to Webpack 5, and now we aren't able to execute start-storybook or build-storybook. Everything was fine on Webpack version 4.
Error when executing start-storybook -p 9001 -s ./src/assets is below:
info @storybook/react v6.2.9
info
info => Loading presets
info => Serving static files from ././src/assets at /
info => Loading 2 other files in "/home/mribar/Documents/projects/demo-ui/.storybook"
info => Loading custom manager config
WARN unable to find package.json for date-and-time
info => Adding stories defined in "/home/mribar/Documents/projects/demo-ui/.storybook/main.js"
info => Loading custom manager config
info => Loading Webpack configuration from `node_modules/react-scripts`
info => Removing existing JavaScript and TypeScript rules.
info => Modifying Create React App rules.
info => Using default Webpack4 setup
(node:21859) [DEP_WEBPACK_SINGLE_ENTRY_PLUGIN] DeprecationWarning: SingleEntryPlugin was renamed to EntryPlugin
(Use `node --trace-deprecation ...` to show where the warning was created)
0% compiling(node:21859) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tap' of undefined
at /home/mribar/Documents/projects/demo-ui/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/index.js:236:65
at SyncHook.eval [as call] (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:17:1)
at SyncHook.lazyCompileHook (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/Hook.js:154:20)
at Compiler.newCompilation (/home/mribar/Documents/projects/demo-ui/node_modules/@storybook/builder-webpack4/node_modules/webpack/lib/Compiler.js:631:26)
at /home/mribar/Documents/projects/demo-ui/node_modules/@storybook/builder-webpack4/node_modules/webpack/lib/Compiler.js:667:29
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/Hook.js:154:20)
at Compiler.compile (/home/mribar/Documents/projects/demo-ui/node_modules/@storybook/builder-webpack4/node_modules/webpack/lib/Compiler.js:662:28)
at /home/mribar/Documents/projects/demo-ui/node_modules/@storybook/builder-webpack4/node_modules/webpack/lib/Watching.js:77:18
at _next2 (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:34:1)
at eval (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:47:1)
(node:21859) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:21859) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
ℹ 「wdm」: wait until bundle finished:
/home/mribar/Documents/projects/demo-ui/node_modules/webpack/lib/util/MapHelpers.js:17
const value = map.get(key);
^
TypeError: Cannot read property 'get' of undefined
at exports.provide (/home/mribar/Documents/projects/demo-ui/node_modules/webpack/lib/util/MapHelpers.js:17:20)
at /home/mribar/Documents/projects/demo-ui/node_modules/webpack/lib/DefinePlugin.js:289:51
at SyncHook.eval [as call] (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
at SyncHook.lazyCompileHook (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/Hook.js:154:20)
at Compiler.newCompilation (/home/mribar/Documents/projects/demo-ui/node_modules/@storybook/core-server/node_modules/webpack/lib/Compiler.js:631:26)
at /home/mribar/Documents/projects/demo-ui/node_modules/@storybook/core-server/node_modules/webpack/lib/Compiler.js:667:29
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/Hook.js:154:20)
at Compiler.compile (/home/mribar/Documents/projects/demo-ui/node_modules/@storybook/core-server/node_modules/webpack/lib/Compiler.js:662:28)
at /home/mribar/Documents/projects/demo-ui/node_modules/@storybook/core-server/node_modules/webpack/lib/Watching.js:77:18
at _next0 (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:25:1)
at eval (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:34:1)
at watchRunHook (/home/mribar/Documents/projects/demo-ui/node_modules/webpack-virtual-modules/index.js:173:5)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:30:1)
at AsyncSeriesHook.lazyCompileHook (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/Hook.js:154:20)
at Watching._go (/home/mribar/Documents/projects/demo-ui/node_modules/@storybook/core-server/node_modules/webpack/lib/Watching.js:41:32)
Error when executing build-storybook -s ./src -o ./dist is below:
info @storybook/react v6.2.9
info
info => Cleaning outputDir: /home/mribar/Documents/projects/demo-ui/dist
info => Copying static files: ././src => ./
info => Loading presets
info => Loading custom manager config
info => Compiling manager..
info => Compiling preview..
info => Loading 2 other files in "/home/mribar/Documents/projects/demo-ui/.storybook"
WARN unable to find package.json for date-and-time
info => Adding stories defined in "/home/mribar/Documents/projects/demo-ui/.storybook/main.js"
info => Loading custom manager config
info => Loading Webpack configuration from `node_modules/react-scripts`
info => Removing existing JavaScript and TypeScript rules.
info => Modifying Create React App rules.
info => Using default Webpack4 setup
0% compiling(node:21924) [DEP_WEBPACK_SINGLE_ENTRY_PLUGIN] DeprecationWarning: SingleEntryPlugin was renamed to EntryPlugin
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:21924) UnhandledPromiseRejectionWarning: TypeError: The 'compilation' argument must be an instance of Compilation
at Function.getCompilationHooks (/home/mribar/Documents/projects/demo-ui/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js:125:10)
at /home/mribar/Documents/projects/demo-ui/node_modules/terser-webpack-plugin/dist/index.js:571:67
at SyncHook.eval [as call] (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:93:1)
at SyncHook.lazyCompileHook (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/Hook.js:154:20)
at Compiler.newCompilation (/home/mribar/Documents/projects/demo-ui/node_modules/@storybook/builder-webpack4/node_modules/webpack/lib/Compiler.js:631:26)
at /home/mribar/Documents/projects/demo-ui/node_modules/@storybook/builder-webpack4/node_modules/webpack/lib/Compiler.js:667:29
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/Hook.js:154:20)
at Compiler.compile (/home/mribar/Documents/projects/demo-ui/node_modules/@storybook/builder-webpack4/node_modules/webpack/lib/Compiler.js:662:28)
at /home/mribar/Documents/projects/demo-ui/node_modules/@storybook/builder-webpack4/node_modules/webpack/lib/Compiler.js:321:11
at Compiler.readRecords (/home/mribar/Documents/projects/demo-ui/node_modules/@storybook/builder-webpack4/node_modules/webpack/lib/Compiler.js:529:11)
at /home/mribar/Documents/projects/demo-ui/node_modules/@storybook/builder-webpack4/node_modules/webpack/lib/Compiler.js:318:10
at _next1 (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
at eval (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
(node:21924) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:21924) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
/home/mribar/Documents/projects/demo-ui/node_modules/webpack/lib/util/MapHelpers.js:17
const value = map.get(key);
^
TypeError: Cannot read property 'get' of undefined
at exports.provide (/home/mribar/Documents/projects/demo-ui/node_modules/webpack/lib/util/MapHelpers.js:17:20)
at /home/mribar/Documents/projects/demo-ui/node_modules/webpack/lib/DefinePlugin.js:289:51
at SyncHook.eval [as call] (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
at SyncHook.lazyCompileHook (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/Hook.js:154:20)
at Compiler.newCompilation (/home/mribar/Documents/projects/demo-ui/node_modules/@storybook/core-server/node_modules/webpack/lib/Compiler.js:631:26)
at /home/mribar/Documents/projects/demo-ui/node_modules/@storybook/core-server/node_modules/webpack/lib/Compiler.js:667:29
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/home/mribar/Documents/projects/demo-ui/node_modules/tapable/lib/Hook.js:154:20)
at Compiler.compile (/home/mribar/Documents/projects/demo-ui/node_modules/@storybook/core-server/node_modules/webpack/lib/Compiler.js:662:28)
at /home/mribar/Documents/projects/demo-ui/node_modules/@storybook/core-server/node_modules/webpack/lib/Compiler.js:321:11
at Array.<anonymous> (/home/mribar/Documents/projects/demo-ui/node_modules/@storybook/core-server/node_modules/webpack/lib/Compiler.js:534:20)
at Storage.finished (/home/mribar/Documents/projects/demo-ui/node_modules/@storybook/core-server/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
at /home/mribar/Documents/projects/demo-ui/node_modules/@storybook/core-server/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
at callback (/home/mribar/Documents/projects/demo-ui/node_modules/graceful-fs/polyfills.js:299:20)
at FSReqCallback.oncomplete (fs.js:183:21)
This is Storybooks main.js Webpack configuration. We have tried disabling custom rules, but we are still getting the same errors.
We are using npm v7.9.0.
We are installing the dependencies with npm i --legacy-peer-deps. We suspect that this is an actual issue, since storybook is still using Webpack 4.
We are using node v14.16.1.
Any workaround or suggestion will be appreciated.
The text was updated successfully, but these errors were encountered:
We have migrated to Webpack 5, and now we aren't able to execute start-storybook or build-storybook. Everything was fine on Webpack version 4.
Error when executing
start-storybook -p 9001 -s ./src/assets
is below:Error when executing
build-storybook -s ./src -o ./dist
is below:This is Storybooks main.js Webpack configuration. We have tried disabling custom rules, but we are still getting the same errors.
This is our
package.json
list ofdependencies
anddevDependencies
.We are using
npm v7.9.0
.We are installing the dependencies with
npm i --legacy-peer-deps
. We suspect that this is an actual issue, since storybook is still using Webpack 4.We are using
node v14.16.1
.Any workaround or suggestion will be appreciated.
The text was updated successfully, but these errors were encountered: