jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.3k stars 507 forks source link

"TypeError: Cannot read property 'get' of undefined" when running "npm run storybook" #1093

Open o2bomb opened 3 years ago

o2bomb commented 3 years ago

Current Behavior

Just as the title says, I've been trying to create a new tsdx project using the react-with-storybook preset. When running npm run storybook, the following error occurs:

Click to expand! ``` PS D:\Users\felix\Documents\My Projects\yong2-ui> npm run storybook > yong2-ui@0.1.0 storybook D:\Users\felix\Documents\My Projects\yong2-ui > start-storybook -p 6006 info @storybook/react v6.3.12 info info => Loading presets info => Loading 1 config file in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook" info => Loading 9 other files in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook" info => Adding stories defined in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook\main.js" info => Using implicit CSS loaders info => Using prebuilt manager info => Using default Webpack4 setup (node:16332) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss', you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details. (Use `node --trace-deprecation ...` to show where the warning was created) Starting type checking service... 0% compilingERR! TypeError: Cannot read property 'get' of undefined ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack\lib\DefinePlugin.js:292:38 ERR! at SyncHook.eval [as call] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:19:10), :13:1) ERR! at SyncHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.newCompilation (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:631:26) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:667:29 ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.compile (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:662:28) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Watching.js:77:18 ERR! at _next1 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :25:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :35:1) ERR! at watchRun (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\fork-ts-checker-webpack-plugin\lib\index.js:208:13) ERR! at _next0 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :31:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :44:1) ERR! at watchRunHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack-virtual-modules\index.js:173:5) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :40:1) ERR! TypeError: Cannot read property 'get' of undefined ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack\lib\DefinePlugin.js:292:38 ERR! at SyncHook.eval [as call] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:19:10), :13:1) ERR! at SyncHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.newCompilation (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:631:26) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:667:29 ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.compile (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:662:28) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Watching.js:77:18 ERR! at _next1 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :25:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :35:1) ERR! at watchRun (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\fork-ts-checker-webpack-plugin\lib\index.js:208:13) ERR! at _next0 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :31:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :44:1) ERR! at watchRunHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack-virtual-modules\index.js:173:5) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\f4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :40:1) WARN Broken build, fix the error above. WARN You may need to refresh the browser. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! yong2-ui@0.1.0 storybook: `start-storybook -p 6006` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the yong2-ui@0.1.0 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! C:\Users\felix\AppData\Roaming\npm-cache\_logs\2021-10-23T09_28_23_119Z-debug.log PS D:\Users\felix\Documents\My Projects\yong2-ui> npm run storybook > yong2-ui@0.1.0 storybook D:\Users\felix\Documents\My Projects\yong2-ui > start-storybook -p 6006 info @storybook/react v6.3.12 info info => Loading presets info => Loading 1 config file in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook" info => Loading 9 other files in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook" info => Adding stories defined in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook\main.js" info => Using implicit CSS loaders info => Using prebuilt manager info => Using default Webpack4 setup (node:18796) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss', you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details. (Use `node --trace-deprecation ...` to show where the warning was created) Starting type checking service... 0% compilingERR! TypeError: Cannot read property 'get' of undefined ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack\lib\DefinePlugin.js:292:38 ERR! at SyncHook.eval [as call] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:19:10), :13:1) ERR! at SyncHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.newCompilation (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:631:26) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:667:29 ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.compile (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:662:28) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Watching.js:77:18 ERR! at _next1 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :25:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :35:1) ERR! at watchRun (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\fork-ts-checker-webpack-plugin\lib\index.js:208:13) ERR! at _next0 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :31:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :44:1) ERR! at watchRunHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack-virtual-modules\index.js:173:5) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :40:1) ERR! TypeError: Cannot read property 'get' of undefined ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack\lib\DefinePlugin.js:292:38 ERR! at SyncHook.eval [as call] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:19:10), :13:1) ERR! at SyncHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.newCompilation (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:631:26) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:667:29 ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.compile (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:662:28) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Watching.js:77:18 ERR! at _next1 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :25:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :35:1) ERR! at watchRun (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\fork-ts-checker-webpack-plugin\lib\index.js:208:13) ERR! at _next0 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :31:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :44:1) ERR! at watchRunHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack-virtual-modules\index.js:173:5) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\f4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :40:1) WARN Broken build, fix the error above. WARN You may need to refresh the browser. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! yong2-ui@0.1.0 storybook: `start-storybook -p 6006` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the yong2-ui@0.1.0 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! C:\Users\felix\AppData\Roaming\npm-cache\_logs\2021-10-23T09_30_25_134Z-debug.log PS D:\Users\felix\Documents\My Projects\yong2-ui> npm run storybook > yong2-ui@0.1.0 storybook D:\Users\felix\Documents\My Projects\yong2-ui > start-storybook -p 6006 info @storybook/react v6.3.12 info info => Loading presets info => Loading 1 config file in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook" info => Loading 9 other files in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook" info => Adding stories defined in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook\main.js" info => Using implicit CSS loaders info => Using prebuilt manager info => Using default Webpack4 setup (node:12344) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss', you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details. (Use `node --trace-deprecation ...` to show where the warning was created) Starting type checking service... 0% compilingERR! TypeError: Cannot read property 'get' of undefined ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack\lib\DefinePlugin.js:292:38 ERR! at SyncHook.eval [as call] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:19:10), :13:1) ERR! at SyncHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.newCompilation (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:631:26) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:667:29 ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.compile (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:662:28) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Watching.js:77:18 ERR! at _next1 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :25:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :35:1) ERR! at watchRun (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\fork-ts-checker-webpack-plugin\lib\index.js:208:13) ERR! at _next0 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :31:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :44:1) ERR! at watchRunHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack-virtual-modules\index.js:173:5) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :40:1) ERR! TypeError: Cannot read property 'get' of undefined ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack\lib\DefinePlugin.js:292:38 ERR! at SyncHook.eval [as call] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:19:10), :13:1) ERR! at SyncHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.newCompilation (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:631:26) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:667:29 ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.compile (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:662:28) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Watching.js:77:18 ERR! at _next1 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :25:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :35:1) ERR! at watchRun (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\fork-ts-checker-webpack-plugin\lib\index.js:208:13) ERR! at _next0 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :31:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :44:1) ERR! at watchRunHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack-virtual-modules\index.js:173:5) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\fPS D:\Users\felix\Documents\My Projects\yong2-ui> npm run storybook > yong2-ui@0.1.0 storybook D:\Users\felix\Documents\My Projects\yong2-ui > start-storybook -p 6006 info @storybook/react v6.3.12 info info => Loading presets info => Loading 1 config file in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook" info => Loading 9 other files in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook" info => Adding stories defined in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook\main.js" info => Using implicit CSS loaders info => Using prebuilt manager info => Using default Webpack4 setup (node:19892) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss', you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details. (Use `node --trace-deprecation ...` to show where the warning was created) Starting type checking service... 0% compilingERR! TypeError: Cannot read property 'get' of undefined ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack\lib\DefinePlugin.js:292:38 ERR! at SyncHook.eval [as call] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:19:10), :13:1) ERR! at SyncHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.newCompilation (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:631:26) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:667:29 ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.compile (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:662:28) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Watching.js:77:18 ERR! at _next1 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :25:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :35:1) ERR! at watchRun (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\fork-ts-checker-webpack-plugin\lib\index.js:208:13) ERR! at _next0 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :31:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :44:1) ERR! at watchRunHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack-virtual-modules\index.js:173:5) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :40:1) ERR! TypeError: Cannot read property 'get' of undefined ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack\lib\DefinePlugin.js:292:38 ERR! at SyncHook.eval [as call] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:19:10), :13:1) ERR! at SyncHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.newCompilation (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:631:26) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:667:29 ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.compile (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:662:28) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Watching.js:77:18 ERR! at _next1 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :25:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :35:1) ERR! at watchRun (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\fork-ts-checker-webpack-plugin\lib\index.js:208:13) ERR! at _next0 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :31:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :44:1) ERR! at watchRunHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack-virtual-modules\index.js:173:5) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpackPS D:\Users\felix\Documents\My Projects\yong2-ui> npm run storybook > yong2-ui@0.1.0 storybook D:\Users\felix\Documents\My Projects\yong2-ui > start-storybook -p 6006 info @storybook/react v6.3.12 info info => Loading presets info => Loading 1 config file in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook" info => Loading 9 other files in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook" info => Adding stories defined in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook\main.js" info => Using implicit CSS loaders info => Using prebuilt manager info => Using default Webpack4 setup (node:13372) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss', you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details. (Use `node --trace-deprecation ...` to show where the warning was created) Starting type checking service... 0% compilingERR! TypeError: Cannot read property 'get' of undefined ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack\lib\DefinePlugin.js:292:38 ERR! at SyncHook.eval [as call] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:19:10), :13:1) ERR! at SyncHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.newCompilation (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:631:26) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:667:29 ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.compile (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:662:28) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Watching.js:77:18 ERR! at _next1 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :25:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :35:1) ERR! at watchRun (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\fork-ts-checker-webpack-plugin\lib\index.js:208:13) ERR! at _next0 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :31:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :44:1) ERR! at watchRunHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack-virtual-modules\index.js:173:5) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :40:1) ERR! TypeError: Cannot read property 'get' of undefined ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack\lib\DefinePlugin.js:292:38 ERR! at SyncHook.eval [as call] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:19:10), :13:1) ERR! at SyncHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.newCompilation (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:631:26) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:667:29 ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.compile (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:662:28) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Watching.js:77:18 ERR! at _next1 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :25:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :35:1) ERR! at watchRun (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\fork-ts-checker-webpack-plugin\lib\index.js:208:13) ERR! at _next0 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :31:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :44:1) ERR! at watchRunHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack-virtual-modules\index.js:173:5) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\fPS D:\Users\felix\Documents\My Projects\yong2-ui> npm run storybook > yong2-ui@0.1.0 storybook D:\Users\felix\Documents\My Projects\yong2-ui > start-storybook -p 6006 info @storybook/react v6.3.12 info info => Loading presets info => Loading 1 config file in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook" info => Loading 9 other files in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook" info => Adding stories defined in "D:\Users\felix\Documents\My Projects\yong2-ui\.storybook\main.js" info => Using implicit CSS loaders info => Using prebuilt manager info => Using default Webpack4 setup (node:22692) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss', you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details. (Use `node --trace-deprecation ...` to show where the warning was created) Starting type checking service... 0% compilingERR! TypeError: Cannot read property 'get' of undefined ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack\lib\DefinePlugin.js:292:38 ERR! at SyncHook.eval [as call] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:19:10), :13:1) ERR! at SyncHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.newCompilation (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:631:26) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:667:29 ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.compile (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:662:28) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Watching.js:77:18 ERR! at _next1 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :25:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :35:1) ERR! at watchRun (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\fork-ts-checker-webpack-plugin\lib\index.js:208:13) ERR! at _next0 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :31:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :44:1) ERR! at watchRunHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack-virtual-modules\index.js:173:5) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :40:1) ERR! TypeError: Cannot read property 'get' of undefined ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack\lib\DefinePlugin.js:292:38 ERR! at SyncHook.eval [as call] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:19:10), :13:1) ERR! at SyncHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.newCompilation (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:631:26) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:667:29 ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) ERR! at AsyncSeriesHook.lazyCompileHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\Hook.js:154:20) ERR! at Compiler.compile (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Compiler.js:662:28) ERR! at D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\webpack\lib\Watching.js:77:18 ERR! at _next1 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :25:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :35:1) ERR! at watchRun (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\fork-ts-checker-webpack-plugin\lib\index.js:208:13) ERR! at _next0 (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :31:1) ERR! at eval (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :44:1) ERR! at watchRunHook (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\webpack-virtual-modules\index.js:173:5) ERR! at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Users\felix\Documents\My Projects\yong2-ui\node_modules\@storybook\builder-webpack4\node_modules\tapable\lib\HookCodeFactory.js:33:10), :40:1) WARN Broken build, fix the error above. WARN You may need to refresh the browser. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! yong2-ui@0.1.0 storybook: `start-storybook -p 6006` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the yong2-ui@0.1.0 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! C:\Users\felix\AppData\Roaming\npm-cache\_logs\2021-10-23T09_47_09_331Z-debug.log PS D:\Users\felix\Documents\My Projects\yong2-ui> ```

Expected behavior

The storybook app runs as expected instead of crashing

Additional context

I have run npm install and npm start in a separate terminal.

Your environment

System:
    OS: Windows 10 10.0.19043
    CPU: (16) x64 Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz
    Memory: 6.94 GB / 15.74 GB
  Binaries:
    Node: 14.18.1 - C:\Program Files\nodejs\node.EXE       
    npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (94.0.992.50)
    Internet Explorer: 11.0.19041.1202
  npmPackages:
    tsdx: ^0.14.1 => 0.14.1
    typescript: ^4.4.4 => 4.4.4
samavati commented 3 years ago

same here

arendeutsch commented 3 years ago

have the same issue

avilaj commented 3 years ago

Same here!

AvilaCodeDev commented 3 years ago

Same here!

TylerCarrington commented 3 years ago

@size-limit/preset-small-lib ^6 has a depedency on webpack v5 but storybook requires v4, downgrading size limit resolved the issue.

arendeutsch commented 3 years ago

can confirm that downgrading @size-limit/preset-small-lib to version 5.0.5 solved the problem.

Thanks !

BrandonClapp commented 3 years ago

Confirmed @TylerCarrington is correct.

I needed to downgrade both @size-limit/preset-small-lib and size-limit from 6.0.4 to 5.0.5.