We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在使用yarn包管理器的时候,使用emp3.0创建vue项目,安装完依赖时,我们发现警告:
在执行dev命令的时候,我们遇到了如下错误:
检查/node_modules/vue-loader/lib/plugin-webpack5.js,发现引入了webpack,但没有该依赖
经过问题溯源,发现对于vue-loader源代码,使用pnpm和npm构建运行是没有问题的,webpack会被正确安装。后续我们发现vue2以及vue3插件都有类似的问题出现。
在对npm、yarn以及pnpm三款社区流行的包管理器测试中,我们发现,三款包管理器对于peerDependencies的兼容处理不太相同。
总结来说,yarn的设计理念更倾向于让开发者明确地管理他们的依赖关系,而不是自动地做出决定。
"resolutions": { "webpack": "^4.1.0 || ^5.0.0-0" }
The larger the version span, the more important it is to ensure its stability!
The text was updated successfully, but these errors were encountered:
mark!
Sorry, something went wrong.
No branches or pull requests
发生了什么
在使用yarn包管理器的时候,使用emp3.0创建vue项目,安装完依赖时,我们发现警告:

在执行dev命令的时候,我们遇到了如下错误:

检查/node_modules/vue-loader/lib/plugin-webpack5.js,发现引入了webpack,但没有该依赖

经过问题溯源,发现对于vue-loader源代码,使用pnpm和npm构建运行是没有问题的,webpack会被正确安装。后续我们发现vue2以及vue3插件都有类似的问题出现。
问题原因
在对npm、yarn以及pnpm三款社区流行的包管理器测试中,我们发现,三款包管理器对于peerDependencies的兼容处理不太相同。
总结来说,yarn的设计理念更倾向于让开发者明确地管理他们的依赖关系,而不是自动地做出决定。
解决方案
The larger the version span, the more important it is to ensure its stability!
The text was updated successfully, but these errors were encountered: