You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, np assumes that engines.npm IS specified, and so when you don't have engines.npm specified, it crashes with the message: "Please upgrade to npmundefined" (yes, that is verbatim)!
Steps to reproduce
Literally just run np in a repository with engines.node specified but not engines.npm specified in package.json
Expected behavior
For np to not throw when engines.npm is not specified.
From a quick glance, it looks like the issue is with this part:
I can confirm that this error doesn't happen with np@7, meaning the issue is 100% from this PR: #683
So that should help narrow things down!
JaneJeon
changed the title
NPM version check fails when npm is not specified in engines field in package.json
np v8 breaking bug: NPM version check fails when npm is not specified in engines field in package.json
May 27, 2023
Description
According to npm docs, it's okay to put
engines.node
but NOTengines.npm
: https://docs.npmjs.com/cli/v9/configuring-npm/package-json?v=true#enginesHowever,
np
assumes thatengines.npm
IS specified, and so when you don't haveengines.npm
specified, it crashes with the message: "Please upgrade to npmundefined" (yes, that is verbatim)!Steps to reproduce
Literally just run
np
in a repository withengines.node
specified but notengines.npm
specified in package.jsonExpected behavior
For np to not throw when
engines.npm
is not specified.From a quick glance, it looks like the issue is with this part:
np/source/version.js
Line 61 in c113539
Environment
np -8.0.0
Node.js - v18.16.0
npm - v9.5.1
The text was updated successfully, but these errors were encountered: