Passa al contenuto principale
Versione: Prossimo

Codici di errore

ERR_PNPM_UNEXPECTED_STORE

È presente una cartella dei moduli ed è collegata a una cartella dell'archivio diversa.

Se hai modificato intenzionalmente la cartella dell'archiviio, esegui pnpm install e pnpm reinstallerà le dipendenze utilizzando il nuovo archivio.

ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE

Un progetto ha una dipendenza dallo spazio di lavoro che non esiste nello spazio di lavoro.

Ad esempio, il pacchetto foo ha bar@1.0.0 nelle dipendenze (dependencies):

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

Tuttavia, c'è solo bar@2.0.0 nell'area di lavoro, quindi pnpm install fallirà.

Per correggere questo errore, tutte le dipendenze che utilizzano il protocollo dello spazio di lavoro devono essere aggiornate per utilizzare le versioni dei pacchetti presenti nell'area di lavoro. Questa operazione può essere eseguita manualmente o utilizzando il comando pnpm -r update.

ERR_PNPM_PEER_DEP_ISSUES

pnpm install avrà esito negativo se il progetto ha dipendenze peer non risolte o se le dipendenze peer non corrispondono agli intervalli desiderati. Per risolvere questo problema, installa le dipendenze peer mancanti.

Puoi anche ignorare selettivamente questi errori usando i campi pnpm.peerDependencyRules.ignoreMissing e pnpm.peerDependencyRules.allowedVersions in package.json.

ERR_PNPM_OUTDATED_LOCKFILE

Questo errore si verifica quando l'installazione non può essere eseguita senza modifiche al file di blocco. Ciò potrebbe verificarsi in un ambiente CI se qualcuno ha modificato un file package.json nel repository senza eseguire pnpm install in seguito. Oppure qualcuno ha dimenticato di eseguire il commit delle modifiche al file di blocco.

Per correggere questo errore, esegui semplicemente pnpm install e salva le modifiche nel file di blocco.

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.

Ad esempio:

  • 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)