Berny23 / LD-ToyPad-Emulator

Toy Pad Emulator for Lego Dimensions (Unofficial Fan Project)
https://github.com/Berny23/LD-ToyPad-Emulator
MIT License
227 stars 41 forks source link

node index.js #167

Open capper742 opened 7 months ago

capper742 commented 7 months ago

Have been working for 2 months with no issues.

Yesterday when I went to launch the ToyPad and I got to entering the node index.js step, and i got the below error.

Any ideas?

undefined:1

SyntaxError: Unexpected end of JSON input at JSON.parse () at initalizeToyTagsJSON (/home/capper742/LD-ToyPad-Emulator/index.js:140:25) at Object. (/home/capper742/LD-ToyPad-Emulator/index.js:27:1) at Module._compile (internal/modules/cjs/loader.js:816:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32) at Function.Module._load (internal/modules/cjs/loader.js:620:12) at Function.Module.runMain (internal/modules/cjs/loader.js:877:12) at internal/main/run_main_module.js:21:11

Vihu360 commented 7 months ago

The error is occurring in the initializeToyTagsJSON function at line 140 of your index.js file.

Have you tried error handling in the function ? if not, here i am giving the template, try it you will get more clarity about your errors.

try { // Your code } catch (error) { console.error('Error :', error); }