Support webpack 5
See original GitHub issueCurrent behavior
After upgrading to our app to webpack5 https://github.com/nextcloud/nextcloud-vue/pull/1781, vue-styleguidist build
fails with the following output:
Building style guide ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 92%(node:70115) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.
BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.
Building style guide ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 99%TypeError: message.split is not a function
at formatMessage (/var/www/nextcloud/apps/nextcloud-vue/node_modules/react-dev-utils/formatWebpackMessages.js:18:23)
at Array.map (<anonymous>)
at formatWebpackMessages (/var/www/nextcloud/apps/nextcloud-vue/node_modules/react-dev-utils/formatWebpackMessages.js:106:39)
at /var/www/nextcloud/apps/nextcloud-vue/node_modules/vue-styleguidist/lib/scripts/binutils.js:98:58
at Hook.eval [as callAsync] (eval at create (/var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:26:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
at emitRecords.err (/var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/lib/Compiler.js:468:23)
at Compiler.emitRecords (/var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/lib/Compiler.js:846:39)
at emitAssets.err (/var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/lib/Compiler.js:460:11)
at hooks.afterEmit.callAsync.err (/var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/lib/Compiler.js:828:14)
at eval (eval at create (/var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:30:1)
at compiler.hooks.afterEmit.tapAsync (/var/www/nextcloud/apps/nextcloud-vue/node_modules/stylelint-webpack-plugin/dist/linter.js:65:7)
at Hook.eval [as callAsync] (eval at create (/var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:24:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
at asyncLib.forEachLimit.err (/var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/lib/Compiler.js:825:27)
at /var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/node_modules/neo-async/async.js:2818:7
at done (/var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/node_modules/neo-async/async.js:3522:9)
at alreadyWritten (/var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/lib/Compiler.js:668:8)
at outputFileSystem.readFile (/var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/lib/Compiler.js:756:19)
at /var/www/nextcloud/apps/nextcloud-vue/node_modules/webpack/node_modules/graceful-fs/graceful-fs.js:123:16
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
The main reason for the failure seems to be TypeError: message.split is not a function
. A similar problem was also reported for react-styleguidist: https://github.com/styleguidist/react-styleguidist/issues/1703. Maybe this helps finding the reason for the problem.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:37 (23 by maintainers)
Top Results From Across the Web
To v5 from v4 - webpack
This guide aims to help you migrating to webpack 5 when using webpack directly. If you are using a higher level tool to...
Read more >facebook/create-react-app - Webpack 5 support overview
Overview of tasks needed for updating CRA to Webpack 5 - Some of the work will support both Webpack 4 + 5 but...
Read more >Webpack 5 Adoption - Next.js
Next.js has adopted webpack 5 as the default for compilation. We've spent a lot of effort into ensuring the transition from webpack 4...
Read more >Upgrading Webpack 4 → 5 | Square Corner Blog
We used mocha-webpack to build and run our mocha tests. We realized mocha-webpack didn't support Webpack 5 and is no longer maintained. There ......
Read more >Webpack 5 Migration - Nx
Webpack 5 comes with Nx 13, and your apps should work as long as you use compatible webpack plugins (or don't have customized...
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
Bump! 5.0.0 is now released https://github.com/facebook/create-react-app/releases/tag/v5.0.0
Should Webpack 5 be working with
v4.44.18
or is the fix not released yet? With the above version we are still seeing: