我无法使用 Webpack 5 运行 npm start。我得到一个大对象输出和 2 个错误
正如标题所说,我在升级到WebPack 5后正在运行npm start
。我无法适合整个对象,因此这是返回对象的最后几行:
headerName: 'Webpack',
baseDataPath: 'configuration',
postFormatter: [Function: postFormatter]
}
这些是错误:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] open:src: `babel-node tools/srcServer.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] open:src script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user1\AppData\Roaming\npm-cache\_logs\2022-03-29T17_53_33_649Z-debug.log
ERROR: "open:src" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `npm-run-all --parallel open:src`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user1\AppData\Roaming\npm-cache\_logs\2022-03-29T17_53_33_691Z-debug.log
其他人遇到这个问题吗?
As the title says, I am having issues running npm start
after upgrading to Webpack 5. I cannot fit the whole object, so here are the last few lines of the object that is returned:
headerName: 'Webpack',
baseDataPath: 'configuration',
postFormatter: [Function: postFormatter]
}
These are the errors:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] open:src: `babel-node tools/srcServer.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] open:src script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user1\AppData\Roaming\npm-cache\_logs\2022-03-29T17_53_33_649Z-debug.log
ERROR: "open:src" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `npm-run-all --parallel open:src`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user1\AppData\Roaming\npm-cache\_logs\2022-03-29T17_53_33_691Z-debug.log
Has anyone else encountered this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以使用
less
看到真正的错误消息,但输出是在 STDERR 上,因此你需要将其重定向到 STDOUT:对我来说这是一个配置错误,我仍在使用 Webpack 4 样式键
模块.规则
。You can see the real error message with
less
, but the output is on STDERR, so you need to redirect it to STDOUT:For me it was a configuration error, I was still using Webpack 4 style keys in
module.rules
.