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

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报错如Runing this command will add the dependency to the workspace root所示_第1张图片pnpm报错如Runing this command will add the dependency to the workspace root所示_第2张图片

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

pnpm config set ignore-workspace-root-check true

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

pnpm报错如Runing this command will add the dependency to the workspace root所示_第3张图片

你可能感兴趣的:(前端,npm)