Pnpm 错误

1,687 阅读1分钟

 ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)

image.png

WARN  deprecated babel-eslint@8.2.6: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
 WARN  deprecated eslint-loader@1.9.0: This loader has been deprecated. Please use eslint-webpack-plugin
 WARN  deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
 WARN  deprecated html-webpack-plugin@2.30.1: out of support
 WARN  deprecated axios@0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
 WARN  deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
 WARN  deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
 WARN  deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
 WARN  deprecated acorn-dynamic-import@2.0.2: This is probably built in to whatever tool you're using. If you still need it... idk
 WARN  deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
 WARN  deprecated har-validator@5.1.5: this library is no longer supported
 WARN  deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
 WARN  deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
 WARN  deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
 ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)

This error happened while installing the dependencies of vue@2.7.14
 at @vue/compiler-sfc@2.7.14

Your Node version is incompatible with "registry.npmmirror.com/postcss/8.4.21".

Expected version: ^10 || ^12 || >=14
Got: 8.17.0

This is happening because the package's manifest has an engines.node field specified.
To fix this issue, install the required Node version.
Progress: resolved 588, reused 175, downloaded 0, added 0

解决:.npmrc文件取消设置engine-strict或者设置为false

use-node-version=8.17.0
node-version=8.17.0
engine-strict=true

改为

use-node-version=8.17.0
node-version=8.17.0
engine-strict=false