Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
ensure-node-env
Advanced tools
A script that helps ensure you have the correct node & npm versions installed in your environment.
A script that helps ensure you have the correct node & npm versions installed globally in your environment.
Add the following to your package.json
:
...
"engines": {
"node": "^8.9.0",
"npm": "^5.5.1"
},
"scripts": {
"preinstall": "npx ensure-node-env",
...
Where the node
and npm
engine properties specify a valid semver range for Node and npm version respectively.
This script is designed to be used as a development-only preinstall check in the project root. For libraries that are published and consumed in other projects it is considered good enough to include it as a pretest check:
npm install ensure-node-env --save-dev
...
"engines": {
"node": "^8.9.0",
"npm": "^5.5.1"
},
"scripts": {
"pretest": "ensure-node-env",
...
Skyscanner Node development requires Node LTS and npm ^5.5.1
. Nvm users can run nvm use
to switch to lts/carbon
. Nave users can use nave auto
. You can also download Node LTS using the website. To install npm ^5.5.1
, run npm install -g npm@^5.5.1
.
1.0.7 - 2018-09-12
FAQs
A script that helps ensure you have the correct node & npm versions installed in your environment.
The npm package ensure-node-env receives a total of 3,018 weekly downloads. As such, ensure-node-env popularity was classified as popular.
We found that ensure-node-env demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.