Yarn: Error: Found incompatible module

Created on 11 Oct 2016  Â·  15Comments  Â·  Source: yarnpkg/yarn

Do you want to request a _feature_ or report a _bug_?
A bug.

What is the current behavior?
Running yarn results to an error.

error [email protected]: The engine "node" is incompatible with this module. Expected version "3.1.0".
error Found incompatible module

If the current behavior is a bug, please provide the steps to reproduce.
$ mkdir yarn-test && cd yarn-test && yarn-init
$ yarn add [email protected]

What is the expected behavior?
Successfully installed [email protected] package.

Please mention your node.js, yarn and operating system version.

~/repos/yarntest $ node -v
v5.4.1
~/repos/yarntest $ yarn -V
0.15.1

OS: Mac OS X 10.11.6 (15G1004)

cat-compatibility

Most helpful comment

I got the impression from the docs that the --ignore-engines flag would ignore the engines field – I don't know what "ignoring" means in this case, but I'd assume that it's equivalent to npm's behavior of "warn but continue."

However, applying that flag doesn't seem to change anything– both cases that I gave above still exit when they encounter the field.

Should I file a new issue for "doesn't respect --ignore-engines"?

All 15 comments

This is probably because bem-utils expects iojs right? https://github.com/jozanza/bem-utils/blob/master/package.json#L10

Looks like bem-utils incorrectly sets the node engine option. We're technically doing the right thing here. npm by default doesn't enforce these sorts of restrictions which leads to incorrect packages like this. I'll leave this open while we continue to evaluate how much of a compatibility hazard this is. I'd recommend opening an issue on the bem-utils package to get this resolved on their side in the meantime.

I have two other packages that use engines: https://github.com/crocodilejs/frisbee/blob/master/package.json ("node": "6.0.0") and https://github.com/davidtheclark/cosmiconfig/blob/master/package.json ("node": "4"). The first is a dep of a react-native project I'm working on, and the second is a dep of Mozilla's debugger.html.

I don't think that npm warned me about either of them, or I just missed it in their output logs…

I hadn't realized that the engines field was semver before.

I should file an issue on Frisbee, and I don't even understand why the second has that entry, since npm doesn't care.

I got the impression from the docs that the --ignore-engines flag would ignore the engines field – I don't know what "ignoring" means in this case, but I'd assume that it's equivalent to npm's behavior of "warn but continue."

However, applying that flag doesn't seem to change anything– both cases that I gave above still exit when they encounter the field.

Should I file a new issue for "doesn't respect --ignore-engines"?

@jlongster just filed #638, which reports my --ignore-engines bug.

Another incompatible package: https://github.com/oncletom/crx/blob/master/package.json#L18

  "engines": {
    "node": ">=0.10",
    "iojs": ">=1.0.0 <2.0.0"
  },

Another:

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

Shown inside parchment's package.json:

"node": ">= 5.3"

Running on Node 6.6.0

Did you install yarn from the package repository? If you did, you may want to take a look at this #812

@hiendv - nope, just npm i -g yarn. Responded here with my env.

Another:

error [email protected]: The engine "node" is incompatible with this module. Expected version "~4.1.1".
error Found incompatible module

In reveal.js package: https://github.com/hakimel/reveal.js/blob/master/package.json

"engines": {
    "node": "~4.1.1"
},

Running on node v6.6.0

I think that, since #647 is merged and will presumably be part of a release soon, this can be closed?

resolved in #647

With latest version of Yarn, I stil get the issue on Debian 8.5.

error [email protected]: The engine "node" is incompatible with this module. Expected version ">= 6.9.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Installing the latest version of node (non-LTS) fixed the issue. some other issues came up but that's solved

λ yarn add powerbi-visuals-tools
yarn add v0.24.5
[1/4] Resolving packages...
warning powerbi-visuals-tools > gulp-powerbi-package-validator > tslint > findup-sync > glob > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning powerbi-visuals-tools > gulp-powerbi-package-validator > gulp-unzip > through2 > xtend > [email protected]:
warning powerbi-visuals-tools > gulp-powerbi-package-validator > gulp > vinyl-fs > glob-watcher > gaze > globule > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning powerbi-visuals-tools > gulp-powerbi-package-validator > gulp > vinyl-fs > glob-watcher > gaze > globule > glob > [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
[2/4] Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version "4.2.4". error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Still getting the same issue even with yarn's latest (v0.24.5) and latest non-LTS node (v7.10.0).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jmorrell picture jmorrell  Â·  93Comments

sfabriece picture sfabriece  Â·  73Comments

fahrradflucht picture fahrradflucht  Â·  120Comments

indieisaconcept picture indieisaconcept  Â·  90Comments

jiripospisil picture jiripospisil  Â·  128Comments