Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Incorrect warning about engineStrict #7492

Closed
mgol opened this issue Feb 27, 2015 · 5 comments
Closed

Incorrect warning about engineStrict #7492

mgol opened this issue Feb 27, 2015 · 5 comments
Labels

Comments

@mgol
Copy link

mgol commented Feb 27, 2015

$ npm --version
2.7.0
$ node --version
v1.4.1
$ npm -g i npm-bump                                                                   
npm WARN engineStrict Per-package engineStrict (found in package.json for npm-bump)
npm WARN engineStrict won't be used in npm 3+. Use the config setting `engine-strict` instead.
/Users/mgol/.nvm/versions/io.js/v1.4.1/bin/npm-bump -> /Users/mgol/.nvm/versions/io.js/v1.4.1/lib/node_modules/npm-bump/bin/npm-bump
[email protected] /Users/mgol/.nvm/versions/io.js/v1.4.1/lib/node_modules/npm-bump
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

The problem is there's no engineStrict in npm-bump's package.json. ;) It used to be there but I removed it. I've checked after the installation:

$ cat ~/.nvm/versions/io.js/v1.4.1/lib/node_modules/npm-bump/package.json | grep engine
  "engines": {
@smikes
Copy link
Contributor

smikes commented Feb 28, 2015

That's a really cool bug.

Added:
By the way, I was able to trigger the message, but I didn't figure out how it happened.

@othiym23
Copy link
Contributor

othiym23 commented Mar 5, 2015

This was a surprisingly tricky bug to address, but I ultimately realized that this warning, like many others, is really only useful to package maintainers. That means you only care about engineStrict in the current top-level package.json, so I added a post-install validation check for exactly that. Landed as b6bd99a. Thanks for filing this, @mzgol!

@aa6my
Copy link

aa6my commented Mar 11, 2015

my error output like this. how to fix it?

npm WARN engineStrict Per-package engineStrict (found in package.json for cordova)
npm WARN engineStrict won't be used in npm 3+. Use the config setting engine-strict instead.
npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.0","npm":"2.7.0"})
npm WARN engine [email protected]: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.0","npm":"2.7.0"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.0","npm":"2.7.0"})

@kenany
Copy link
Contributor

kenany commented Mar 11, 2015

@aa6my I don't see an error in the log you've posted. I just see a few warnings, which in many cases can usually be ignored without consequences.

@othiym23
Copy link
Contributor

Plus I tweaked that behavior some more in [email protected] to only warn for the current package, not child dependencies. So when you upgrade again after 2.7.1 is out of testing, you'll stop getting the engineStrict warning.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants