Catch Error for Failure to Run Node Setup

This commit is contained in:
Brenden Harrell committed 2021-06-07 07:54:45 -05:00
1 parent 23ba403fd8
commit ac9926488a
1 file changed
+12 -2
+12 -2
View File
@@ -80,17 +80,27 @@ if (optionsAccepted === 0) {
console.log('')
console.log('')
try {
const fs = require('fs')
const path = './Client/node_modules'
if ( fs.existsSync(path) ) {
try {
const { fork } = require('child_process')
fork('./Client/client.js', process.argv, options)
} catch (err) {
} 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.')