question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support webpack 5

See original GitHub issue

Current 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:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:37 (23 by maintainers)

github_iconTop GitHub Comments

3reactions
skjnldsvcommented, Jan 10, 2022
1reaction
dominik-blncommented, Mar 15, 2022

Should Webpack 5 be working with v4.44.18 or is the fix not released yet? With the above version we are still seeing:

node --trace-deprecation ./node_modules/.bin/vue-cli-service styleguidist
ℹ 「wds」: Project is running at http://localhost:6060/
ℹ 「wds」: webpack output is served from
ℹ 「wds」: Content not from webpack is served from /Users/horbd/Projects/alpha/alpha/frontend/public

You can now view your style guide in the browser:

  Local:            http://localhost:6060/
  On your network:  http://192.168.178.72:6060/

Compiling ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■    93%(node:32276) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation..
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_*.
    at /Users/horbd/Projects/alpha/alpha/frontend/node_modules/mini-html-webpack-plugin/index.js:27:33
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found