webpack: [webpack-cli] TypeError: cli.isMultipleCompiler is not a function
I’m getting TypeError: cli.isMultipleCompiler
is not a function when running an app via docker. The node modules are installed, I’m using
"webpack": "5.72.1",
"webpack-cli": "4.9.2",
"webpack-dev-server": "4.8.0"
Any ideas what could be causing it?
Here’s the full error
[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
shared | at Command.<anonymous> (/app/node_modules/@webpack-cli/serve/lib/index.js:146:35)
shared | at async Promise.all (index 1)
shared | at async Command.<anonymous> (/app/node_modules/webpack-cli/lib/webpack-cli.js:1674:7)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (3 by maintainers)
Links to this issue
Commits related to this issue
- Bump version of webpack-cli@~4.10.0 Fixes webpack start error `cli.isMultipleCompilers` See also the following webpack issues: * https://github.com/webpack/webpack-cli/issues/3294 * https://gith... — committed to phovea/generator-phovea by thinkh 2 years ago
- Fixes cli.isMultipleCompiler is not a function Building the app for development fails with a type error, according to this issue https://github.com/webpack/webpack/issues/15951#issuecomment-115479588... — committed to koox00/mattermost-webapp by koox00 2 years ago
- upgrade @edx/frontend-build version version to 12.0.3 This commit fixes webpack-cli issue https://github.com/webpack/webpack/issues/15951 — committed to fennec-tech/frontend-app-profile by ARMBouhali 2 years ago
- Fix MISB package not compiling anymore (https://github.com/webpack/webpack/issues/15951) — committed to opensensorhub/osh-js by mdhsl 2 years ago
- Data synchronizer support for dynamically adding and removing datasources #691 (#693) * Fix issue while adding a datasource to synchronizer while it is running * Add example to demonstrate add/rem... — committed to opensensorhub/osh-js by mdhsl 2 years ago
Please upgrade to the latest version of webpack-cli that is 4.10.0
Duplicate of https://github.com/webpack/webpack-cli/issues/3294, fix is-
Found the answer! Here is how you update your webpack-cli for anyone else who was curious.
First, check your version of webpack by running this command in the terminal of your IDE: webpack --version. You should see a list that appears like this: webpack: 5.71.0 webpack-cli: 4.10.0
webpack-dev-server 4.8.0
If your webpack-cli reads anything below 4.10.0, then you need to update it to the latest version for npm to run properly on your localhost with JHipster. Here’s how to update it.
Run this command in the terminal of your IDE: npm install webpack-cli@4.10.0
[Right now, the latest version is 4.10.0, but for the future updates when you run this command, change the version at the end of the command line to updated to that current version: npm install webpack-cli@(INSERT NEW VERSION DIGITS HERE).
Then re-run webpack --version, and see if your webpack has updated to the version that you entered above.
EXTRA NOTES:
Why did you have this error? According to webpack.js.org: “Note that this is not a recommended practice. Installing globally locks you down to a specific version of webpack and could fail in projects that use a different version.”
So, if you ran a command like this: npm install --global webpack, then there is a good chance that you were locked down to a specific version. This might have been the error. That’s what I believe happened to me anyway. I ran npm install -g, or something of that nature.
Sources for your journey and research that relate to the material above:
Hope this helps! Best of blessings to ya!
fixed, but shows this error: Could not find a canister id to forward to.