Catch Error for Failure to Run Node Setup
This commit is contained in:
1 parent
23ba403fd8
commit
ac9926488a
1 file changed
+18
-8
@@ -80,17 +80,27 @@ if (optionsAccepted === 0) {
|
||||
console.log('')
|
||||
console.log('')
|
||||
|
||||
try {
|
||||
const { fork } = require('child_process')
|
||||
fork('./Client/client.js', process.argv, options)
|
||||
} catch (err) {
|
||||
console.log('')
|
||||
console.log('Fail to create Client Process.')
|
||||
console.log('')
|
||||
const fs = require('fs')
|
||||
const path = './Client/node_modules'
|
||||
if ( fs.existsSync(path) ) {
|
||||
|
||||
fatalErrorHelp()
|
||||
try {
|
||||
const { fork } = require('child_process')
|
||||
fork('./Client/client.js', process.argv, options)
|
||||
} catch (err) {
|
||||
console.log('')
|
||||
console.log('Fail to create Client Process.')
|
||||
console.log('')
|
||||
|
||||
fatalErrorHelp()
|
||||
}
|
||||
} else {
|
||||
console.log('')
|
||||
console.log('ERROR: node_modules does not exist. Try running node setup to solve this issue. Then try again.')
|
||||
console.log('')
|
||||
}
|
||||
|
||||
|
||||
function fatalErrorHelp() {
|
||||
console.log('')
|
||||
console.log('* If your device does not have MORE than 8GB of RAM then please use the minMemo option.')
|
||||
|
||||
Reference in new issue
Block a user