Incompatible with Webpack 5
See original GitHub issueWhen adding this addon to a storybook using webpack 5, the following error occurs:
ERROR in ./node_modules/storybook-design-token/node_modules/postcss/lib/previous-map.js 8:35-50
Module not found: Error: Can't resolve 'path' in '/node_modules/storybook-design-token/node_modules/postcss/lib'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
- install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "path": false }
@ ./node_modules/storybook-design-token/node_modules/postcss/lib/input.js 10:42-67
@ ./node_modules/storybook-design-token/node_modules/postcss/lib/parse.js 8:36-54
@ ./node_modules/storybook-design-token/node_modules/postcss/lib/postcss.js 18:36-54
@ ./node_modules/storybook-design-token/dist/parsers/postcss.parser.js 54:32-50
@ ./node_modules/storybook-design-token/dist/hooks/useTokenTabs.js 11:23-59
@ ./node_modules/storybook-design-token/dist/components/Panel.js 27:21-53
@ ./node_modules/storybook-design-token/dist/register.js 9:14-43
Adding resolve.fallback
to the webpack configuration per the instructions does not seem to work for me.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
Incompatible with Webpack 5 due to Buffer dependency #1029
I was finally able to make it works.. npm install assert browserify-zlib buffer process stream-browserify util. Then in my webpack config: const ...
Read more >Incompatible with Webpack - Google Groups
I was trying to utilize Cesium in an application that utilizes Webpack and ran into numerous errors that state: "require function is used...
Read more >To v5 from v4 - webpack
This guide aims to help you migrating to webpack 5 when using webpack directly. ... Webpack 5 requires at least Node.js 10.13.0 (LTS),...
Read more >TsconfigPathsPlugin type not compatible with webpack 5
I'm trying to upgrade to webpack 5, but I'm now getting a type error when trying to use the TsconfigPathsPlugin.
Read more >Error on faunadb driver for js, incompatible with webpack 5.67?
Just recently create a react app using creat-react-app, and install faunadb and zustand but everytime i tried to import faunadb the error ...
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
Published as v1.2.0
Thanks for reporting. I will have a closer look as soon as possible.