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

Fix Node compatibility error for Node @ 14 #62

Closed
wants to merge 2 commits into from

Conversation

Saeris
Copy link

@Saeris Saeris commented Sep 21, 2020

An incorrect setting for the engines filed in the project's package.json is causing install errors for major versions of node above v10, such as the following:

error [email protected]: The engine "node" is incompatible with this module. Expected version "^10.17.0"
. Got "14.10.0"

After running into this error I tried updating both node and yarn to the latest versions (14.11.0 and 1.22.5 respectively) and continued to get an incompatible module error.

It would appear that the or condition isn't being checked, so while ^14.10.0 should satisfy >=12.3.0, semver isn't checking against that condition and fast failing on ^10.17.0 instead, limiting the major version range. Swapping the order of this semver rule may solve for this error.

Additional CI tests may be required, but I'm unsure how to properly configure those.

An incorrect setting for the `engines` filed in the project's `package.json` is causing install errors for major versions of node above v10, such as the following:

```bash
error [email protected]: The engine "node" is incompatible with this module. Expected version "^10.17.0"
. Got "14.10.0"
```
After running into this error I tried updating both node and yarn to the latest versions (`14.11.0` and `1.22.5` respectively) and continued to get an incompatible module error.

It would appear that the or condition isn't being checked, so while `^14.10.0` should satisfy `>=12.3.0`, semver isn't checking against that condition and fast failing on `^10.17.0` instead, limiting the major version range. A simpler condition should satisfy the minimum version requirement, such as `>=10.17.0` as proposed in this PR.
@codecov
Copy link

codecov bot commented Sep 21, 2020

Codecov Report

Merging #62 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #62   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          231       231           
  Branches        36        36           
=========================================
  Hits           231       231           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b2bab5...96ae5c7. Read the comment docs.

@Saeris
Copy link
Author

Saeris commented Sep 21, 2020

Also worth noting, I'm running Windows 10. Saw that the tests were being run for node@^14 on ubuntu but only node@^12 on windows. Don't know if that would have caught this problem before.

@Saeris Saeris changed the title Fix Node Compatibility to be >= v10.17.0 Fix Node compatibility error for Node @ 14 Sep 21, 2020
@gbiryukov
Copy link

@Richienb this needs to be released because currently there is no way to install this package on node@14 neither install node-fetch@3 which depends on this package

@jimmywarting jimmywarting mentioned this pull request Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants