首页 前端知识 pnpm报错如Runing this command will add the dependency to the workspace root所示

pnpm报错如Runing this command will add the dependency to the workspace root所示

2025-03-04 11:03:04 前端知识 前端哥 675 248 我要收藏

Running this command will add the dependency to the workspace root, which might not be what you want - if you really meant it, make it explicit by running this command again with the -w flag (or --workspace-root). If you don't want to see this warning anymore, you may set the ignore-workspace-root-check setting to true.

报错触发场景:当在采用pnpm搭建的menorepo项目根目录下执行pnpm dlx @eslint/create-config后会报错,原因是在根目录下安装依赖是不被允许,解决办法如下:

pnpm config set ignore-workspace-root-check true

之后再在根目录下面安装依赖就不会报错了。

转载请注明出处或者链接地址:https://www.qianduange.cn//article/22598.html
标签
评论
发布的文章

图论-腐烂的橘子

2025-03-04 11:03:06

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!