Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current Node.js version check (which is used to determine whether to skip the npm version check) is actually the wrong way around:
np/lib/prerequisite.js
Line 93 in cec8e00
For example,
version.isVersionLower('6.0.0', 'v11.6.0')
returnsfalse
, therefore not skipping the following npm version check:np/lib/prerequisite.js
Line 97 in cec8e00
Since most installations nowadays include a newer npm version, the error was probably rarely thrown (even though the task ran on newer Node.js versions). However, Node.js v11.6.0 includes npm v6.5.0-next.0, a pre-release version. Pre-release versions do not satisfy by default which means that the above check fails and the error is thrown.
Instead of fixing the actual error, I’ve decided to remove the whole npm version check since
np
requires Node.js v8 by now (and won’t actually run on Node.js v6).Fixes #309.