如何求解[webpack-cli] typeerror:cli.ismultiplecompiler不是函数
我遇到了我不了解的错误,我尝试了很多事情,例如重新安装所有依赖项,但没有任何想法?这是错误提示:
No production canister_ids.json found. Continuing with local
[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
at Command.<anonymous> (/Users/davidmartinezgil/proyect/node_modules/@webpack-cli/serve/lib/index.js:146:35)
at async Promise.all (index 1)
at async Command.<anonymous> (/Users/davidmartinezgil/proyect/node_modules/webpack-cli/lib/webpack-cli.js:1674:7)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(13)
我有类似的错误试图运行JHIPSTER应用程序,错误是:
有些人建议从 4.9.2 4.9.2 更新 webpack-cli 到 4.10.0 < /strong>
对我而言,可以运行
npm Start
我希望对您有用。
webpack eskitess的参考
I had a similar error trying to run a Jhipster app, the error is:
Some suggest to update the webpack-cli from 4.9.2 to 4.10.0
For me works and could run
npm start
I hope works for you.
References from webpack issues
确保您首先在终端中的项目目录中
,在终端中键入以下内容,然后键入输入,
然后输入以下输入并命中输入:
它应该有效
,也许您必须在创建的每个新项目中执行此操作。
Ensure you are in your project directory in your terminal
first, type the following in your terminal and hit enter
then type the following and hit enter:
it should work
Maybe you will have to do this in every new project you create.
这是您如何更新Webpack-CLI,以适应其他好奇的人。
首先,通过在IDE终端运行此命令来检查您的WebPack版本:
webpack -version
。您应该看到一个出现这样的列表:如果您的webpack-cli读取以下任何内容
4.10.0
,则需要将其更新为最新版本,以使NPM与Jhipster在Localhost上正确运行。这是更新它的方法。在您的IDE终端中运行此命令:
[现在,最新版本是
4.10.0
,但是对于未来的更新,在运行此命令时,请在命令行末尾更改版本要更新到当前版本:然后重新运行
webpack -version
,看看您的WebPack是否已更新到您在上面输入的版本。额外说明:
为什么有这个错误?根据
webpack.js.org
:“请注意,这不是推荐的练习。安装全球锁定您进入特定版本的WebPack,并且可能会在使用不同版本的项目中失败。”因此,如果您运行了这样的命令:
npm install -Global webpack
,那么您很有可能被锁定到特定版本。这可能是错误。我相信这就是我所发生的。我运行npm install -g
或这种性质的东西。与上述材料相关的旅程和研究的来源:
希望这会有所帮助!祝福你最好!
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: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:
[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: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 rannpm 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!
在终端中运行以下代码行,它将解决您的问题。
如果您的WebPack在低于版本4.10.0
npm install
Run the below line of code in terminal it will resolve your issue.
If your webpack is below version 4.10.0
npm install [email protected]
我删除了node_modules,package-lock.json,如果有一个构建文件夹,请还删除该文件夹并运行NPM安装。
它对我有用
I deleted node_modules, package-lock.json and if there is a build folder, delete that as well and run npm install.
it worked for me
如果您使用的是纱线,则运行
纱线添加webpack-cli
If you are using yarn then run
yarn add webpack-cli
对我来说,这很容易
转到您的package.json文件,然后将版本从4.9.x更改为4.10
并运行NPM安装
然后运行NPM重新开始,就像魔术一样工作!
for me it was a easy one
go to your package.json file and change the version from 4.9.x to 4.10
and run npm install
then run npm start again, works like magic!
安装WebPack-CLI版本4.10
这可能会解决。
Install webpack-cli version 4.10
This might work out.
我删除了node_modules和package-lock.json。然后再次安装NPM。
I deleted node_modules and package-lock.json. And then run npm install again.
将“ package-json”中的“ webpack-cli”版本更新为“ 4.10.0”,然后在终端中运行“ NPM安装”,然后运行“ NPM启动”。它对我有用。
Update the "webpack-cli" version in the "package-json" to "4.10.0" , and then run "npm install" in your terminal , then run "npm start" . It worked for me just fine.
更新WebPack-CLI:确保已安装了最新版本的WebPack-CLI。运行以下命令将其更新:
Update webpack-cli: Make sure you have the latest version of webpack-cli installed. Run the following command to update it:
在说NPM启动之前,请尝试编写我用星号标记的代码。
dfx部署
*** npm安装-Save-dev webpack-cli
npm start
Before saying npm start, try writing the code I marked with an asterisk.
dfx deploy
***npm install --save-dev webpack-cli
npm start
确保您在您的终端类型中处于项目目录中
的以下内容并击中输入
Ensure you are in your project directory in your terminal
Type the following in your terminal and hit enter