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
+10
+10
View File
@@ -80,6 +80,10 @@ if (optionsAccepted === 0) {
console.log('')
console.log('')
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)
@@ -90,6 +94,12 @@ try {
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('')