SyntaxError: Invalid or unexpected token
See original GitHub issueSending messages to worker:
(node:30) UnhandledPromiseRejectionWarning: SyntaxError: Invalid or unexpected token
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:30) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
Express random error when i enter a route that doesn’t exists
SyntaxError: Invalid or unexpected token
at Layer.handle [as handle_request] (/sistema/server/node_modules/express/lib/router/layer.js:95:5)
at next (/sistema/server/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/sistema/server/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/sistema/server/node_modules/express/lib/router/layer.js:95:5)
at /sistema/server/node_modules/express/lib/router/index.js:281:22
at param (/sistema/server/node_modules/express/lib/router/index.js:354:14)
at param (/sistema/server/node_modules/express/lib/router/index.js:365:14)
at Function.process_params (/sistema/server/node_modules/express/lib/router/index.js:410:3)
at next (/sistema/server/node_modules/express/lib/router/index.js:275:10)
at SendStream.error (/sistema/server/node_modules/serve-static/index.js:121:7)
at SendStream.emit (events.js:210:5)
at SendStream.error (/sistema/server/node_modules/send/index.js:270:17)
at SendStream.onStatError (/sistema/server/node_modules/send/index.js:421:12)
at next (/sistema/server/node_modules/send/index.js:735:16)
at onstat (/sistema/server/node_modules/send/index.js:724:14)
at FSReqCallback.oncomplete (fs.js:158:21)
This is one of the many errors i get when i run my project compiled with bytenode. Any help? My project is stable with the source code. But i need to protect it.
Issue Analytics
- State:
- Created 4 years ago
- Comments:38
Top Results From Across the Web
SyntaxError: Unexpected token - JavaScript - MDN Web Docs
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
Read more >Uncaught SyntaxError: Invalid or unexpected token
I am a beginner so I get stuck in syntax a lot. If it is that then please help me out. javascript ·...
Read more >Have a JavaScript Unexpected Token Error? Check Your Syntax
The JavaScript's parser expects tokens and symbols in a particular order, with relevant values or variables in between. Often, an Unexpected ...
Read more >JavaScript Error Handling: Unexpected Token - GeeksforGeeks
Not follow them throws an error.An unexpected token occurs if JavaScript code has a missing or extra character { like, ) + –...
Read more >JavaScript SyntaxError: Invalid or unexpected token ... - IBM
The issue now is that the page is blank and we have a javascript error in the web console. Error: "SyntaxError: Invalid or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Using
--no-flush-bytecode
on the bytenode command line has also resolved this issue for us too. If there is a way to always do this so we don’t need to have custom command lines it would be goodHi, I guess you get this problem due to bytecode flushing, just try this solution: