liuweiGL / vite-plugin-mkcert

Provide certificates for vite's https dev service.
https://www.npmjs.com/package/vite-plugin-mkcert
MIT License
541 stars 37 forks source link

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

Closed dotennin closed 1 year ago

dotennin commented 1 year ago

Describe the bug

This error happened while installing a direct dependency of /root/project/netSDL/projects/edm-bo

Your Node version is incompatible with "registry.npmjs.org/vite-plugin-mkcert/1.10.1".

Expected version: >=v16.0.0
Got: v14.19.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 0, reused 1, downloaded 0, added 0

Reproduction

while executing pnpm add vite-plugin-mkcert -D (additional it's works with yarn add vite-plugin-mkcert -D)

System Info

Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:

  System:
    OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa)
    CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
    Memory: 14.76 GB / 15.62 GB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 16.18.1 - /Users/dotennin-mac/Library/pnpm/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.19.2 - /Users/dotennin-mac/Library/pnpm/npm
    Watchman: 20221016.020512.0 - /usr/local/bin/watchman
  Browsers:
    Chrome: 106.0.5249.119
  npmPackages:
    @vitejs/plugin-vue: ^1.10.2 => 1.10.2
    vite: 2.9.1 => 2.9.1

Used package manager: pnpm

Logs

node -v
--> v16.18.1
/usr/bin/node -v
-->  v16.18.1
which node
--> /Users/dotennin-mac/Library/pnpm/node
/Users/dotennin-mac/Library/pnpm/node -v
--> v16.18.1

dotennin commented 1 year ago

Found

/usr/local/bin/node -v
--> v14.19.0
dotennin commented 1 year ago

solved with updating pnpm version , hence closing this issue https://github.com/pnpm/pnpm/issues/4841