added warning for incompatible versions of node
This commit is contained in:
parent
142128c938
commit
1e760335f4
10
main.coffee
10
main.coffee
|
@ -11,8 +11,10 @@ cli = require 'commander'
|
|||
chalk = require 'chalk'
|
||||
semver = require 'semver'
|
||||
reactInit = require 'react-native/local-cli/init'
|
||||
rnVersion = require(__dirname + '/package.json').dependencies['react-native']
|
||||
pkgJson = require __dirname + '/package.json'
|
||||
|
||||
nodeVersion = pkgJson.engines.node
|
||||
rnVersion = pkgJson.dependencies['react-native']
|
||||
resources = __dirname + '/resources/'
|
||||
camelRx = /([a-z])([A-Z])/g
|
||||
projNameRx = /\$PROJECT_NAME\$/g
|
||||
|
@ -255,4 +257,10 @@ cli.command 'listdevices'
|
|||
.join '\n')
|
||||
|
||||
|
||||
unless semver.satisfies process.version[1...], nodeVersion
|
||||
logErr """
|
||||
Natal requires Node.js version #{nodeVersion}
|
||||
You have #{process.version[1...]}
|
||||
"""
|
||||
|
||||
cli.parse process.argv
|
||||
|
|
Loading…
Reference in New Issue