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

engines.node in package.json is not working as expected #3673

Closed
hronro opened this issue Aug 15, 2021 · 6 comments · Fixed by #3974
Closed

engines.node in package.json is not working as expected #3673

hronro opened this issue Aug 15, 2021 · 6 comments · Fixed by #3974

Comments

@hronro
Copy link

hronro commented Aug 15, 2021

pnpm version: 6.13.0

Code to reproduce the issue:

My Node.js version: v16.6.2
My pnpm version: 6.13.0

What's in my package.json:

{
  "engines": {
    "node": ">=16"
  }
}

Expected behavior:

When I run pnpm start, there shouldn't be any errors or warnings.

Actual behavior:

When I run pnpm start, I got this warning:

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

I guess it's probably because when I run npm scripts, it uses the node executable bundled in the pnpm, instead of the node executable I installed in the OS?

@Shinigami92
Copy link

Shinigami92 commented Oct 28, 2021

I can reproduce this with my machine

Arch Linux x86_64 5.10.75-1-lts
nvm 0.39.0
npm 8.1.0
node v16.13.0
pnpm 6.19.1

Using pnpm env use --global 16 doesn't help 🙁

This keeps me from using corepack 🙁

@zkochan
Copy link
Member

zkochan commented Oct 28, 2021

I know about this issue. I filed #3785 to fix it

@gunta
Copy link

gunta commented Apr 20, 2022

Still reproduces with latest version

@WillsterJohnson
Copy link

needs to be reopened, the PR unfortunately did not fix this, or subsequent changes caused the issue to return.

@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 modified the milestones: v6.21, v6.32 May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants