简体   繁体   English

错误:找不到模块“webpack-cli/bin/config-yargs”问题

[英]Error: Cannot find module 'webpack-cli/bin/config-yargs' problem

I am trying to install blacksmith engine 2d and following the installation steps I can't get this to work correctly, I don't know what I'm doing wrong but when running the npm start command, it appears.我正在尝试安装 blacksmith engine 2d 并且按照安装步骤我无法使其正常工作,我不知道我做错了什么,但是在运行 npm 启动命令时,它出现了。

Error: Cannot find module 'webpack-cli/bin/config-yargs'

and then the following error然后出现以下错误

 {
code: 'MODULE_NOT_FOUND',
requireStack: [
 'C:\\Users\\user1\\source\\js\\Black-Template\\node_modules\\webpack-dev-server\\bin\\webpack-dev- 
server.js'
]
}

I assume your start script is something like我假设您的启动脚本类似于

"start": "webpack-dev-server"

Please try to change it to请尝试将其更改为

"start": "webpack serve"

I had the same problem, this change worked out for me.我有同样的问题,这个改变对我有用。 (Taken from: https://programmerah.com/cannot-find-module-webpack-cli-bin-config-yargs-14915/ ) (取自: https://programmerah.com/cannot-find-module-webpack-cli-bin-config-yargs-14915/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM