Skip to content

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

Description

@hronro

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions