dmtzs / SmartTerrariumR

A project that is used for creating a smart terrarium for your reptile pets. This project is for managing all parameters that the reptile needs in order to have a great life. This is the raspberry version.
https://dmtzs.github.io/SmartTerrariumR/
Other
2 stars 0 forks source link

Bug with the new try and catch handlers #16

Closed dmtzs closed 3 years ago

dmtzs commented 3 years ago

When in developer mode we try to execute the command npm start apears the next error:
App threw an error during load ReferenceError: hijo is not defined at Object.<anonymous> (/home/dmtzs/Documents/p2/index.js:114:1) at Module._compile (internal/modules/cjs/loader.js:1083:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1113:10) at Module.load (internal/modules/cjs/loader.js:940:32) at Module._load (internal/modules/cjs/loader.js:781:14) at Function.f._load (electron/js2c/asar_bundle.js:5:12913) at loadApplicationPackage (/home/dmtzs/Documents/p2/node_modules/electron/dist/resources/default_app.asar/main.js:110:16) at Object.<anonymous> (/home/dmtzs/Documents/p2/node_modules/electron/dist/resources/default_app.asar/main.js:222:9) at Module._compile (internal/modules/cjs/loader.js:1083:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1113:10) Error: spawn ./Server ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19) at onErrorNT (internal/child_process.js:467:16) at processTicksAndRejections (internal/process/task_queues.js:82:21) Error code: ENOENT Signal received: undefined Child Process STDOUT: Child Process STDERR: A JavaScript error occurred in the main process Uncaught Exception: ReferenceError: hijo is not defined at Object.<anonymous> (/home/dmtzs/Documents/p2/index.js:114:1) at Module._compile (internal/modules/cjs/loader.js:1083:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1113:10) at Module.load (internal/modules/cjs/loader.js:940:32) at Module._load (internal/modules/cjs/loader.js:781:14) at Function.f._load (electron/js2c/asar_bundle.js:5:12913) at loadApplicationPackage (/home/dmtzs/Documents/p2/node_modules/electron/dist/resources/default_app.asar/main.js:110:16) at Object.<anonymous> (/home/dmtzs/Documents/p2/node_modules/electron/dist/resources/default_app.asar/main.js:222:9) at Module._compile (internal/modules/cjs/loader.js:1083:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1113:10)

This is a problem that we need to check because its necessary to handle the case we run the app with npm start or in the production mode.
The try and catch are necessary because there is the validation when the flask server executable exists or not.

dmtzs commented 3 years ago

Already fixed, closing this issue.