在VUE 3项目中运行纱线时,找不到模块Terser-webpack-plugin

发布于 2025-02-03 11:36:05 字数 277 浏览 1 评论 0原文

我刚刚使用默认选项使用VUE CLI创建了一个VUE 3项目,当我尝试使用 Yarn Serve 命令运行时,我得到了此错误,

Error: Cannot find module '.../node_modules/terser-webpack-plugin/dist/index.js'. Please verify that the package.json has a valid "main" entry

我可以采取什么措施来解决它?

I just created a Vue 3 project using Vue CLI using the default options, and when I try to run using yarn serve command I got this error

Error: Cannot find module '.../node_modules/terser-webpack-plugin/dist/index.js'. Please verify that the package.json has a valid "main" entry

What I can do to solve it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ㄟ。诗瑗 2025-02-10 11:36:05

我解决了这个问题。我的项目中安装了Terser-Webpack-Plugin的版本。今天,我有更多研究在GitHub上找到了这个问题( https:// github 。

I solved this issue. There was the version of terser-webpack-plugin that was installed in my project. Today some more researchs I found the issue on github (https://github.com/webpack-contrib/terser-webpack-plugin/issues/491) and update my project and then works fine.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文