3.0.1 • Published 4 years ago
node-versions-checker v3.0.1
Node Version Checker
A simple script usefull to check node version before npm install
Usage
npx node-check-version --packageJsonFile=package.json --nvmrcFilePath=.nvmrc
In order to work you must set these nodes on your package.json file:
{
"engineStrict": true,
"engines": {
"node": ">=10.19.0"
},
}
You can easily set a preinstall script like this:
{
"name": "test",
"version": "1.0.0",
"description": "test node version checker",
"main": "index.js",
"engineStrict": true,
"engines": {
"node": ">=10.19.0"
},
"scripts": {
"preinstall": "npx node-version-checker --packageJsonFile=./package.json --nvmrcFilePath=.nvmrc"
},
"author": "",
"license": "ISC"
}
Options
--packageJsonFile path of the packge.json file
--nvmrcFilePath path of the nvmrc file
3.0.1
4 years ago