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

Not compatible with node 7.0 and node 8.0?? #45

Closed
gregberge opened this issue Jun 2, 2017 · 4 comments
Closed

Not compatible with node 7.0 and node 8.0?? #45

gregberge opened this issue Jun 2, 2017 · 4 comments
Assignees

Comments

@gregberge
Copy link

In package.json, I can read it:

"engines": {
  "node": "^6.9.0 || ^4.2.0",
  "npm": "^4.0.0 || ^3.0.0 || ^2.1.9"
}

I am using node v8.0.0, I have the following error:

error [email protected]: The engine "node" is incompatible with this module. Expected version "^6.9.0 || ^4.2.0".

Can you remove engines section from package.json?

@hutson hutson closed this as completed in 741cf34 Jun 3, 2017
@hutson hutson self-assigned this Jun 3, 2017
@hutson hutson added the support label Jun 3, 2017
@hutson
Copy link
Contributor

hutson commented Jun 3, 2017

@neoziro thank you for reporting the issue.

May I assume you're using the Yarn package manager?

I've seen this exact issue from others, including myself, given that I also use yarn, since Yarn treats incompatible node versions as a hard failure instead of a warning.

There's a discussion on the Yarn GitHub project regarding that behavior - yarnpkg/yarn#1102

A workaround is to pass --ignore-engines to yarn install.

Since there has been no upstream movement on a resolution to the strict enforcement of the engines property by Yarn, I've gone ahead and relaxed the version range constraint in this project's package.json file.

The version constraint now specifies all versions of Node greater than, or equal to, 4, and greater than, or equal to, npm 2.

@tinesoft
Copy link

tinesoft commented Jun 3, 2017

Was about to report that issue as well, thanks @hbetts for the promtness and detailed explanation!

@hutson
Copy link
Contributor

hutson commented Jun 3, 2017

Version 1.1.11 has been published.

(At some point I'll set this project up with semantic-release so that fixes go out just a tad bit faster)

@gregberge
Copy link
Author

@hbetts thank you for the fix

hutson added a commit that referenced this issue Mar 19, 2018
Relax the `node` and `npm` version requirements specified in the
`engines` property of the project's `package.json` file.

Yarn checks the version range specified in a package's
`engines.node` property of the `package.json` file.

If you attempt to install a package using a Node version that does not
fall within that package's `engines.node` version range, Yarn will fail
during the install process. This is opposed to printing a warning like
the `npm` package manager does in this situation.

To install a package using a Node version outside of the package's range
you can pass the `--ignore-engines` flag to `yarn`.

Yarn issue related to the strict treatment of the `engines` data:
- yarnpkg/yarn#1102

We are relaxing the range since it does not seem Yarn will, any time
soon, provide a more convenient means of installing packages with
stricter `node` and `npm` version ranges.

While our `node` and `npm` version range was meant to correspond with
our Node LTS support policy, the disruption is too great to our
community. Instead, we will simply need to communicate our support
policy directly when engaging our community.

Closes #45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants