Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

check-node-version.js 373 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
  1. const semver = require('semver')
  2. const { engines } = require('../package.json')
  3. /* istanbul ignore next */
  4. if (!semver.satisfies(process.version, engines.node)) {
  5. console.error(`\n\nYou're using Node.js ${process.version}, but ${engines.node} is required`)
  6. console.error('Visit nodejs.org to download an installer for the latest LTS version.\n\n')
  7. process.exit(1)
  8. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...