Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported engine warning when pnpm up #4409

Closed
louisgv opened this issue Mar 4, 2022 · 8 comments
Closed

Unsupported engine warning when pnpm up #4409

louisgv opened this issue Mar 4, 2022 · 8 comments
Milestone

Comments

@louisgv
Copy link

louisgv commented Mar 4, 2022

pnpm version: 6.32.2

Code to reproduce the issue:

pnpm dlx create-turbo@latest

Update package.json engine field to:

  "engines": {
    "npm": ">=7.0.0",
    "node": ">=16.0.0"
  }

then:

pnpm up --latest

Expected behavior:

No warning at all

Actual behavior:

This warning is being produced:

Unsupported engine: wanted: {"node":">=16.0.0"} (current: {"node":"v14.17.0","pnpm":"6.32.2"})

Additional information:

  • node -v prints: v16.14.0
  • Windows, macOS, or Linux?: Windows

Related issue: #3673

@louisgv
Copy link
Author

louisgv commented Mar 4, 2022

Actually... this might be an issue with turborepo integration with vercel cache. Vercel runner is still on nodejs 14 it seems, due to AWS not updating their runner environment...

@WillsterJohnson
Copy link

This still occurs on pnpm v7.0.0-rc.9 with turborepo v1.2.5. node version is v18.0.0, engines in package.json reads "node": ">=18.0.0", pp up gives;

 WARN  Unsupported engine: wanted: {"node":">=18.0.0"} (current: {"node":"v14.17.0","pnpm":"7.0.0"})

there's definitely something wrong here.
I'm not using turborepo's remote caching however, everything is entirely contained on my local system.

setting "engineStrict" in package.json changes nothing

@d0x7
Copy link

d0x7 commented May 18, 2022

I wanted to install a package with pnpm 7.1.1 and got the same message that one package requires >=16 and that I got v14.17.0, but node -v says v18.1.0. Using find I found that, besides my nvm node version which is 18.1.0, I got five other node binaries, all from vscode-server. But these are either v14.18.3 or v16.13.0, and none of them is v14.17.0 - so I don't really know where that's coming from. I've only started using pnpm yesterday because I thought not clogging my drive with thousand of copies of node_modules would be nice, but that's too much hassle for a few megabyte. I just tried it with npm, after half an hour of google searches, all of which did not solve it, and npm just works - it installed the package and I can continue. Interestingly enough; I wanted to install neodrag/svelte and it complained about sveltejs/kit, which was already installed.

image

@WillsterJohnson
Copy link

I had another problem similar to this earlier in the week and found myself on the linked issue (#4203), it solved the issue for me then, I'm assuming it will solve this also but can't test it currently.

Quoting the solution from @PabloSzx's answer;

pnpm env use --global <desired node version>
pnpm add -g pnpm

@DataHearth
Copy link

Hey, just got the same issue. After running pnpm env use --global gallium, I get the engine warning even tho the found binary is the one expected.

Solution from @willster277 solved the issue. But it doesn't seem reliable to me to install again pnpm right after use a new version ^^.

@zkochan
Copy link
Member

zkochan commented May 23, 2022

This is probably fixed by #4780

@zkochan
Copy link
Member

zkochan commented May 24, 2022

🚢 7.1.5 and 6.32.17

@zkochan zkochan closed this as completed May 24, 2022
@zkochan zkochan added this to the v6.32 milestone May 24, 2022
@bradyab
Copy link

bradyab commented Mar 16, 2023

none of these solutions worked for me, I ended up simply installing the right node version on my machine with n <version>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants