Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'webpack/lib/MultiEntryPlugin' with WebPack 5 #97

Open
asgerhallas opened this issue Nov 29, 2021 · 5 comments
Open

Comments

@asgerhallas
Copy link

Using this plugin with webpack 5 produces below error.

Is this a known error? And in that case, is there a way work through or around it?

[webpack-cli] Failed to load 'C:\workspace\myapp\webpack.config.js' config
[webpack-cli] Error: Cannot find module 'webpack/lib/MultiEntryPlugin'
Require stack:
- C:\workspace\myapp\node_modules\globalize-webpack-plugin\ProductionModePlugin.js
- C:\workspace\myapp\node_modules\globalize-webpack-plugin\index.js
- C:\workspace\myapp\webpack.config.js
- C:\workspace\myapp\node_modules\webpack-cli\lib\webpack-cli.js
- C:\workspace\myapp\node_modules\webpack-cli\lib\bootstrap.js
- C:\workspace\myapp\node_modules\webpack-cli\bin\cli.js
- C:\workspace\myapp\node_modules\webpack\bin\webpack.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\workspace\myapp\node_modules\globalize-webpack-plugin\ProductionModePlugin.js:5:26)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\workspace\\myapp\\node_modules\\globalize-webpack-plugin\\ProductionModePlugin.js',
    'C:\\workspace\\myapp\\node_modules\\globalize-webpack-plugin\\index.js',
    'C:\\workspace\\myapp\\webpack.config.js',
    'C:\\workspace\\myapp\\node_modules\\webpack-cli\\lib\\webpack-cli.js',
    'C:\\workspace\\myapp\\node_modules\\webpack-cli\\lib\\bootstrap.js',
    'C:\\workspace\\myapp\\node_modules\\webpack-cli\\bin\\cli.js',
    'C:\\workspace\\myapp\\node_modules\\webpack\\bin\\webpack.js'
@j-schuster
Copy link

Hello, library maintainers! Is this work slated as part of the roadmap for this project, or can we submit a PR to address migrating to Webpack 5? Happy to do so if it will be helpful

@rxaviers
Copy link
Owner

rxaviers commented Mar 3, 2022

Hi @j-schuster, I'm happy to review and merge your PR to add webpack 5 support to this plugin. Thanks

@devinm-hrbl
Copy link

Hi all, how is this progressing? If it's moving along I'll tell my team to just be patient. If you're stuck, I'll get my project on webpack 4 and see if we can help.

@avtblspd
Copy link

avtblspd commented Jan 12, 2023

I'm stuck with the same problem, Do we have any update on this ?
I'm using storybook with globalize-webpack-plugin

Storybook:

FYI I'm using ckeditor5 with Webpack 5(webpack and webpack cli also ) and also have updated my library project
React 18.2.0
Node : v16.19.0
Npm : 9.2.0
OS: Windows

Storybook:
Package.json
"devDependencies": {
"@storybook/addon-actions": "^6.3.3",
"@storybook/addon-console": "^1.2.3",
"@storybook/addon-controls": "^6.3.3",
"@storybook/addon-docs": "^6.3.3",
"@storybook/addon-postcss": "^2.0.0",
"@storybook/addon-storyshots": "^6.3.3",
"@storybook/addon-toolbars": "^6.3.3",
"@storybook/addon-viewport": "^6.3.3",
"@storybook/addons": "^6.3.3",
"@storybook/react": "^6.3.3",
"@storybook/source-loader": "^6.3.3",
"@storybook/theming": "^6.3.3",
"globalize-webpack-plugin": "^3.0.0"
}

Error :

info @storybook/react v6.5.13
info
ERR! Error: Cannot find module 'webpack/lib/MultiEntryPlugin'
ERR! Require stack:
ERR! - C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\ProductionModePlugin.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\index.js
ERR! - C:\Dev\Git\spa\thumb-components.storybook\webpack-extend.js
ERR! - C:\Dev\Git\spa\thumb-components.storybook\main.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-common\dist\cjs\utils\interpret-require.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-common\dist\cjs\utils\load-custom-presets.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-common\dist\cjs\presets.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-common\dist\cjs\index.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-server\dist\cjs\index.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core\dist\cjs\server.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core\server.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\react\dist\cjs\server\index.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\react\bin\index.js
ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
ERR! at Function.Module._load (node:internal/modules/cjs/loader:841:27)
ERR! at Module.require (node:internal/modules/cjs/loader:1067:19)
ERR! at require (node:internal/modules/cjs/helpers:103:18)
ERR! at Object. (C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\ProductionModePlugin.js:5:26)
ERR! at Module._compile (node:internal/modules/cjs/loader:1165:14)
ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
ERR! at Module.load (node:internal/modules/cjs/loader:1043:32)
ERR! at Function.Module._load (node:internal/modules/cjs/loader:878:12)
ERR! at Module.require (node:internal/modules/cjs/loader:1067:19)
ERR! at require (node:internal/modules/cjs/helpers:103:18)
ERR! at Object. (C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\index.js:4:30)
ERR! at Module._compile (node:internal/modules/cjs/loader:1165:14)
ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
ERR! at Module.load (node:internal/modules/cjs/loader:1043:32)
ERR! at Function.Module._load (node:internal/modules/cjs/loader:878:12)
ERR! Error: Cannot find module 'webpack/lib/MultiEntryPlugin'
ERR! Require stack:
ERR! - C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\ProductionModePlugin.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\index.js
ERR! - C:\Dev\Git\spa\thumb-components.storybook\webpack-extend.js
ERR! - C:\Dev\Git\spa\thumb-components.storybook\main.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-common\dist\cjs\utils\interpret-require.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-common\dist\cjs\utils\load-custom-presets.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-common\dist\cjs\presets.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-common\dist\cjs\index.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-server\dist\cjs\index.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core\dist\cjs\server.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\core\server.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\react\dist\cjs\server\index.js
ERR! - C:\Dev\Git\spa\thumb-components\node_modules@storybook\react\bin\index.js
ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
ERR! at Function.Module._load (node:internal/modules/cjs/loader:841:27)
ERR! at Module.require (node:internal/modules/cjs/loader:1067:19)
ERR! at require (node:internal/modules/cjs/helpers:103:18)
ERR! at Object. (C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\ProductionModePlugin.js:5:26)
ERR! at Module._compile (node:internal/modules/cjs/loader:1165:14)
ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
ERR! at Module.load (node:internal/modules/cjs/loader:1043:32)
ERR! at Function.Module._load (node:internal/modules/cjs/loader:878:12)
ERR! at Module.require (node:internal/modules/cjs/loader:1067:19)
ERR! at require (node:internal/modules/cjs/helpers:103:18)
ERR! at Object. (C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\index.js:4:30)
ERR! at Module._compile (node:internal/modules/cjs/loader:1165:14)
ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
ERR! at Module.load (node:internal/modules/cjs/loader:1043:32)
ERR! at Function.Module._load (node:internal/modules/cjs/loader:878:12) {
ERR! code: 'MODULE_NOT_FOUND',
ERR! requireStack: [
ERR! 'C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\ProductionModePlugin.js',
ERR! 'C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\index.js',
ERR! 'C:\Dev\Git\spa\thumb-components\.storybook\webpack-extend.js',
ERR! 'C:\Dev\Git\spa\thumb-components\.storybook\main.js',
ERR! 'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core-common\dist\cjs\utils\interpret-require.js',
ERR! 'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core-common\dist\cjs\utils\load-custom-presets.js',
ERR! 'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core-common\dist\cjs\presets.js',
ERR! 'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core-common\dist\cjs\index.js',
ERR! 'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core-server\dist\cjs\index.js',
ERR! 'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core\dist\cjs\server.js',
ERR! 'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core\server.js',
ERR! 'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\react\dist\cjs\server\index.js',
ERR! 'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\react\bin\index.js'
ERR! ]
ERR! }

WARN Broken build, fix the error above.
WARN You may need to refresh the browser.

node:internal/modules/cjs/loader:995
const err = new Error(message);
^

Error: Cannot find module 'webpack/lib/MultiEntryPlugin'
Require stack:

  • C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\ProductionModePlugin.js
  • C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\index.js
  • C:\Dev\Git\spa\thumb-components.storybook\webpack-extend.js
  • C:\Dev\Git\spa\thumb-components.storybook\main.js
  • C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-common\dist\cjs\utils\interpret-require.js
  • C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-common\dist\cjs\utils\load-custom-presets.js
  • C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-common\dist\cjs\presets.js
  • C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-common\dist\cjs\index.js
  • C:\Dev\Git\spa\thumb-components\node_modules@storybook\core-server\dist\cjs\index.js
  • C:\Dev\Git\spa\thumb-components\node_modules@storybook\core\dist\cjs\server.js
  • C:\Dev\Git\spa\thumb-components\node_modules@storybook\core\server.js
  • C:\Dev\Git\spa\thumb-components\node_modules@storybook\react\dist\cjs\server\index.js
  • C:\Dev\Git\spa\thumb-components\node_modules@storybook\react\bin\index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\ProductionModePlugin.js:5:26)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\index.js:4:30)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\ProductionModePlugin.js',
    'C:\Dev\Git\spa\thumb-components\node_modules\globalize-webpack-plugin\index.js',
    'C:\Dev\Git\spa\thumb-components\.storybook\webpack-extend.js',
    'C:\Dev\Git\spa\thumb-components\.storybook\main.js',
    'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core-common\dist\cjs\utils\interpret-require.js',
    'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core-common\dist\cjs\utils\load-custom-presets.js',
    'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core-common\dist\cjs\presets.js',
    'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core-common\dist\cjs\index.js',
    'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core-server\dist\cjs\index.js',
    'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core\dist\cjs\server.js',
    'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\core\server.js',
    'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\react\dist\cjs\server\index.js',
    'C:\Dev\Git\spa\thumb-components\node_modules\@storybook\react\bin\index.js'

@mellis481
Copy link

@j-schuster Are you able to submit a PR to allow for this library to work with webpack 5?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants