ERR_PNPM_UNSUPPORTED_ENGINE
error when installing dependencies in Jetpack
#5688
Labels
ERR_PNPM_UNSUPPORTED_ENGINE
error when installing dependencies in Jetpack
#5688
We spotted CI failures in #5682 (CI job) related to installing the dependencies of the Jetpack repository. This is mainly caused by the fact that we use two different node versions,
node
14 for Gutenberg/Gutenberg Mobile andnode
18 for Jetpack.Error message:
The dependency installation is handled by the script
install-jetpack.sh
. It actually switches thenode
version to the required by Jetpack, but still,pnpm
fails upon installation command.After exploring the culprit, we found out the following facts:
node
version used is the expected one.npm
version used is the expected one.pnpm
version used is the expected one.node
version referenced in thenpm
configuration is NOT the expected one.Here is an example:
node --version
:v18.13.0
✅npm --version
:8.19.3
✅pnpm --version
:7.27.0
✅npm config get node-version
:14.21.3
❌The problem is caused due to the fact that
pnpm
is checking the node version with the value provided by thenpm
config, hence it's not matching the expected value.Several workarounds have been tried, but none seemed to work:
-p
parameter to enforcenode
andnpm
versions when usingnpx
.node-version
config parameter manually by runningnpm config set node-version="$(node -v)"
.pnpm
.The text was updated successfully, but these errors were encountered: