에러 코드

An error pnpm raises carries a code that starts with ERR_PNPM_. The code is printed with the error message. A script that reacts to a failure should match on the code, because the message may change between releases and the code does not.

The codes are listed in alphabetical order. A code that is not listed here is explained by its own message.

ERR_PNPM_BAD_RUNTIME_VERSION#

The root project declares a runtime in devEngines.runtime or engines.runtime with onFail set to error, and the installed version of that runtime does not satisfy the declared range. The message names the wanted range and the current version.

Install a matching version of the runtime, or set onFail to download to let pnpm fetch it. To check without failing, set runtimeOnFail to warn or ignore.

ERR_PNPM_CONFIG_UNRESOLVED_ENV_VAR#

A setting in pnpm-workspace.yaml or the global configuration file references an environment variable that isn't set or is empty, and the reference has no fallback. The error names the reference, for example ${MY_STORE_DIR}.

Set the variable, or give the reference a fallback, such as ${NAME:-fallback}, or ${NAME?} for an empty string.

ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE#

A frozen install (pnpm install --frozen-lockfile, the default in CI) found that the boot document of pnpm-lock.yaml is not up to date. The boot document records the config dependencies and the pinned package manager. It changes when configDependencies in pnpm-workspace.yaml changes, or when the pnpm version pinned in package.json changes.

Run pnpm install without --frozen-lockfile and commit the updated lockfile.

ERR_PNPM_HOIST_PATTERN_DIFF#

pnpm add, pnpm remove, pnpm update, or an install that selects only some workspace projects found a modules directory that was installed with a different hoistPattern.

Run pnpm install to recreate the modules directory with the new hoistPattern.

ERR_PNPM_IGNORED_BUILDS#

The install skipped the build scripts of one or more dependencies, because allowBuilds does not allow them, and strictDepBuilds is on. The message lists the packages whose scripts were skipped.

Run pnpm approve-builds to allow the builds you trust. To install without failing on skipped builds, set strictDepBuilds to false.

ERR_PNPM_INVALID_NODE_VERSION#

The nodeVersion setting is not an exact semver version, such as 22.22.3.

ERR_PNPM_INVALID_RUNTIME_VERSION_RANGE#

The version of a runtime declared in devEngines.runtime or engines.runtime is not a valid semver range, and onFail is error.

Fix the range in package.json. To check without failing, set runtimeOnFail to warn or ignore.

ERR_PNPM_LOCKFILE_CONFIG_MISMATCH#

A frozen install found that a setting recorded in pnpm-lock.yaml differs from the current configuration. The message names the setting. The lockfile records overrides, patchedDependencies, catalogs, ignoredOptionalDependencies, the checksums of packageExtensions and the pnpmfile, and the resolution settings in its settings block, such as autoInstallPeers and dedupePeers.

Run pnpm install without --frozen-lockfile and commit the updated lockfile.

ERR_PNPM_MISSING_RUNTIME_VERSION_RANGE#

A runtime declared in devEngines.runtime or engines.runtime has no version, and onFail is error.

Add a version range to the runtime entry in package.json. To check without failing, set runtimeOnFail to warn or ignore.

ERR_PNPM_NODE_LINKER_DIFF#

pnpm add, pnpm remove, pnpm update, or an install that selects only some workspace projects found a modules directory that was installed with a different nodeLinker.

Run pnpm install to recreate the modules directory with the new nodeLinker.

ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE#

프로젝트가 워크스페이스에서 존재하지 않는 워크스페이스 의존성을 갖고 있습니다.

예를 들어, 패키지 foo의 dependencies에 bar@1.0.0이 있다고 합시다:

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

하지만 워크스페이스에는 bar@2.0.0만 있으므로 pnpm install이 실패합니다.

이 오류를 해결하려면 workspace protocol을 사용하는 모든 종속성이 워크스페이스에 있는 패키지 버전을 사용하도록 업데이트해야 합니다. 이 작업은 수동으로 하거나 pnpm -r update 명령을 사용하여 할 수 있습니다.

ERR_PNPM_NO_OFFLINE_META#

pnpm runs with --offline, and the metadata cache has no entry for a package it has to resolve. The message names the package and the cache file it looked for.

Run the command without --offline once, so pnpm downloads the metadata. --prefer-offline uses the cache when it can and downloads what is missing.

ERR_PNPM_OUTDATED_LOCKFILE#

이 오류는 lockfile을 변경하지 않고는 설치를 수행할 수 없을 때 발생합니다. 누군가 저장소의 package.json 파일을 변경한 후 pnpm install을 실행하지 않은 경우 CI 환경에서 이 오류가 발생할 수 있습니다. 또는 누군가 lockfile의 변경 사항을 커밋하는 것을 잊은 경우에도 발생할 수 있습니다.

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

ERR_PNPM_PEER_DEP_ISSUES#

With strictPeerDependencies enabled, pnpm install fails if the project has unresolved peer dependencies or the peer dependencies are not matching the wanted ranges. 이 문제를 해결하려면 누락된 피어 의존성을 설치하십시오.

peerDependencyRules.ignoreMissing 및 peerDependencyRules.allowedVersions 설정을 사용하여 이러한 오류를 선택적으로 무시할 수도 있습니다.

ERR_PNPM_PUBLIC_HOIST_PATTERN_DIFF#

pnpm add, pnpm remove, pnpm update, or an install that selects only some workspace projects found a modules directory that was installed with a different publicHoistPattern.

Run pnpm install to recreate the modules directory with the new publicHoistPattern.

ERR_PNPM_REGISTRY_NAME_MISMATCH#

The registry answered a request for one package with the metadata of a different package. pnpm stops instead of installing the package under a name the registry was not asked about.

Check that the registry configured for the package, or for its scope, is correct. A misconfigured proxy or a registry that serves the wrong document can cause this error.

ERR_PNPM_RUNTIME_NOT_FOUND#

A runtime declared in devEngines.runtime or engines.runtime with onFail set to error is not installed on the system.

Install the runtime, or set onFail to download to let pnpm fetch it. To check without failing, set runtimeOnFail to warn or ignore.

ERR_PNPM_TARBALL_INTEGRITY#

이 오류는 다운로드한 패키지의 tarball이 예상된 integrity 체크섬과 일치하지 않음을 나타냅니다.

If you use the npm registry (registry.npmjs.org), then this usually means that the integrity in your lockfile is incorrect. 이는 lockfile의 병합 충돌이 잘못 해결된 경우에 발생할 수 있습니다.

패키지의 기존 버전을 덮어쓸 수 있는 레지스트리를 사용하는 경우, 로컬 메타데이터 캐시에 해당 패키지의 이전 버전의 integrity 체크섬이 있다는 의미일 수 있습니다. 이 경우 pnpm store prune을 실행하세요. 이 명령은 로컬 메타데이터 캐시를 제거합니다. 그런 다음 실패한 명령을 다시 시도할 수 있습니다.

다만 패키지가 올바른 URL에서 다운로드되는지도 주의 깊게 확인하세요. URL은 오류 메시지에 출력됩니다.

ERR_PNPM_TASK_CYCLE#

A recursive run's task graph contains a dependency cycle. The error lists the participating tasks as <project>#<script> identifiers.

Remove or change the cycle under tasks. If it is deliberate, set ignoreWorkspaceCycles to true to downgrade the error to a warning and run the cycle's tasks without a guaranteed order.

ERR_PNPM_UNEXPECTED_STORE#

모듈 디렉토리가 있고 다른 저장소 디렉토리에 연결되어 있습니다.

스토어 디렉터리를 의도적으로 변경했다면 pnpm install을 실행하세요. pnpm이 새 스토어를 사용하여 종속성을 다시 설치합니다.

ERR_PNPM_UNSUPPORTED_ENGINE#

A project's engines.node or engines.pnpm range, or a dependency's engines.node range, does not accept the current version. The message names the package, the wanted range, and the current version.

A project's incompatible engines.pnpm always raises this error. For engines.node, pnpm raises it only with engineStrict enabled. Without it, an incompatible engines.node in the project or a required dependency produces a warning.

To fix this error, switch to a Node.js or pnpm version the package accepts, or turn engineStrict off for an engines.node mismatch.

ERR_PNPM_VIRTUAL_STORE_DIR_MAX_LENGTH_DIFF#

pnpm add, pnpm remove, pnpm update, or an install that selects only some workspace projects found a modules directory that was installed with a different virtualStoreDirMaxLength.

Run pnpm install to recreate the modules directory with the new virtualStoreDirMaxLength.

ERR_PNPM_WORKSPACE_PKG_NOT_FOUND#

A project declares a dependency with the workspace protocol, but no project in the workspace has that name. The message names the project, the dependency, and its specifier.

Check the spelling of the dependency name, and check that the project it refers to is matched by the packages patterns in pnpm-workspace.yaml.