1 | const version = process.version.split('.')
|
2 | const major = parseInt(version[0].replace(/\D/g,''), 10)
|
3 | // const minor = parseInt(version[1].replace(/\D/g,''), 10)
|
4 |
|
5 | if (major < 10) {
|
6 | console.warn('\x1b[41m%s\x1b[0m', 'INCOMPATIBLE NODE VERSION')
|
7 | console.warn('\x1b[33m%s\x1b[0m', 'Quasar CLI requires Node 10.0.0 or superior')
|
8 | console.warn('')
|
9 | console.warn('⚠️ You are running Node ' + version)
|
10 | console.warn('Please install a compatible Node version and try again')
|
11 |
|
12 | process.exit(1)
|
13 | }
|