frontend-boilerplate icon indicating copy to clipboard operation
frontend-boilerplate copied to clipboard

Add engines config to package.json

Open awolkers opened this issue 5 years ago • 5 comments

Add the engines config to the package.json so if someone want to install this the user knows which version of node he needs. https://docs.npmjs.com/files/package.json#engines

"engines": { "node": ">=8" },

awolkers avatar Jul 17 '19 13:07 awolkers

I don't know if it's worth the effort of keeping up-to-date. It only gives warnings when building and if you ever run into errors when you're on an old node/npm version that's the first thing you'll check. What's your incentive?

mdecorte avatar Jul 19 '19 13:07 mdecorte

Btw: if your app only works on a specific node version that's a problem :D

mdecorte avatar Jul 19 '19 13:07 mdecorte

@mdecorte why's that?

colin-aarts avatar Jul 19 '19 13:07 colin-aarts

@colin-aarts What's your take it? I just don't see the value. You can always add it yourself if you need it for your project, which should be almost never :P

mdecorte avatar Jul 19 '19 14:07 mdecorte

npm docs:

You can also use the “engines” field to specify which versions of npm are capable of properly installing your program. For example:

{ "engines" : { "npm" : "~1.0.20" } }

Unless the user has set the engine-strict config flag, this field is advisory only and will only produce warnings when your package is installed as a dependency.
engineStrict§

This feature was removed in npm 3.0.0

mdecorte avatar Jul 19 '19 14:07 mdecorte