Перейти к основному содержимому
Версия: Будущая

Коды ошибок

ERR_PNPM_UNEXPECTED_STORE

Директория с модулями уже существует, но привязана к другому хранилищу.

Если вы изменили хранилище нарочно, запустите pnpm install и pnpm переустановит зависимости, используя новое хранилище.

ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE

В проекте существует workspace зависимость, которая не существует в workspace.

Например, у пакета foo указан bar@1.0.0 в dependencies:

{
"name": "foo",
"version": "1.0.0",
"dependencies": {
"bar": "workspace:1.0.0"
}
}

Но в workspace есть только bar@2.0.0, так что pnpm install выдаст ошибку.

Чтобы исправить эту ошибку необходимо обновить все зависимости, которые используют workspace protocol, чтобы они использовали версии пакетов уже существующие в workspace. Это может быть сделано или в ручном режиме, или же используя команду pnpm -r update.

ERR_PNPM_PEER_DEP_ISSUES

pnpm install завершится ошибкой, если проект имеет неразрешенные peer зависимости или peer зависимости не соответствуют нужным диапазонам. Чтобы исправить это, установите отсутствующие одноранговые зависимости.

Вы также можете выборочно игнорировать эти ошибки, используя поля pnpm.peerDependencyRules.ignoreMissing и pnpm.peerDependencyRules.allowedVersions в package.json.

ERR_PNPM_OUTDATED_LOCKFILE

This error happens when installation cannot be performed without changes to the lockfile. This might happen in a CI environment if someone has changed a package.json file in the repository without running pnpm install afterwards. Or someone forgot to commit the changes to the lockfile.

To fix this error, just run pnpm install and commit the changes to the lockfile.

ERR_PNPM_TARBALL_INTEGRITY

This error indicates that the downloaded package's tarball did not match the expected integrity checksum.

If you use the npm registry (registry.npmjs.org), then this probably means that the integrity in your lockfile is incorrect. This might happen if a lockfile had badly resolved merge conflicts.

If you use a registry that allows to override existing versions of a package, then it might mean that in your local metadata cache you have the integrity checksum of an older version of the package. In this case, you should run pnpm store prune. This command will remove your local metadata cache. Then you can retry the command that failed.

But also be careful and verify that the package is downloaded from the right URL. The URL should be printed in the error message.

ERR_PNPM_MISMATCHED_RELEASE_CHANNEL

The config field use-node-version defines a release channel different from version suffix.

For example:

  • rc/20.0.0 defines an rc channel but the version is that of a stable release.
  • release/20.0.0-rc.0 defines a release channel but the version is that of an RC release.

To fix this error, either remove the release channel prefix or correct the version suffix.

ERR_PNPM_INVALID_NODE_VERSION

The value of config field use-node-version has an invalid syntax.

Below are the valid forms of use-node-version:

  • Stable release:
    • X.Y.Z (X, Y, Z are integers)
    • release/X.Y.Z (X, Y, Z are integers)
  • RC release:
    • X.Y.Z-rc.W (X, Y, Z, W are integers)
    • rc/X.Y.Z-rc.W (X, Y, Z, W are integers)