错误代码
ERR_PNPM_UNEXPECTED_STORE
存在模块目录并链接到不同的存储目录。
¥A modules directory is present and is linked to a different store directory.
如果你有意更改存储目录,请运行 pnpm install
,pnpm 将使用新存储重新安装依赖。
¥If you changed the store directory intentionally, run pnpm install
and pnpm will reinstall the dependencies using the new store.
ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE
项目具有工作区中不存在的工作区依赖。
¥A project has a workspace dependency that does not exist in the workspace.
例如,包 foo
在 dependencies
中有 bar@1.0.0
:
¥For instance, package foo
has bar@1.0.0
in the dependencies
:
{
"name": "foo",
"version": "1.0.0",
"dependencies": {
"bar": "workspace:1.0.0"
}
}
但是,工作区中只有 bar@2.0.0
,因此 pnpm install
会失败。
¥However, there is only bar@2.0.0
in the workspace, so pnpm install
will fail.
要修复此错误,应更新所有使用 工作区协议 的依赖以使用工作区中存在的包版本。这可以手动或使用 pnpm -r update
命令完成。
¥To fix this error, all dependencies that use the workspace protocol should be updated to use versions of packages that are present in the workspace. This can be done either manually or using the pnpm -r update
command.