I think you can use the "engines" field:
{ "engines" : { "node" : ">=0.12" } }
Since you say that your code will definitely not work with any lower versions, you probably also want the "engineStrict" flag:
{ "engineStrict" : true }
The documentation for the package.json file can be found at npmjs.
Refresh
engineStrict is no longer recommended, so this will only be a warning. Now the user can run npm config set engine-strict true if he wants to.
IBam Mar 30 '15 at 15:09 2015-03-30 15:09
source share