Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node index.js #167

Open
capper742 opened this issue Jan 3, 2024 · 1 comment
Open

node index.js #167

capper742 opened this issue Jan 3, 2024 · 1 comment

Comments

@capper742
Copy link

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
Copy link

Vihu360 commented Jan 5, 2024

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);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants