iisnode icon indicating copy to clipboard operation
iisnode copied to clipboard

SyntaxError: Unexpected token {

Open CrispyBacon1999 opened this issue 3 years ago • 3 comments

I'm deploying a NextJS app to an Azure App Service, but after it deploys successfully, I get the following error message.

Tue Aug 17 2021 20:30:04 GMT+0000 (Coordinated Universal Time): Application has thrown an uncaught exception and is terminated:
SyntaxError: Unexpected token {
    at Module._compile (module.js:434:25)
    at Object..js (module.js:464:10)
    at Module.load (module.js:353:31)
    at Function._load (module.js:311:12)
    at Module.require (module.js:359:17)
    at require (module.js:375:17)
    at Object.<anonymous> (D:\Program Files\iisnode\interceptor.js:459:1)
    at Module._compile (module.js:446:26)
    at Object..js (module.js:464:10)
    at Module.load (module.js:353:31)

It shows up every time the page loads, and the page instantly just gives a 500 errror. Any ideas on what could be going wrong?

WEBSITE_NODE_DEFAULT_VALUE=14-lts

CrispyBacon1999 avatar Aug 17 '21 20:08 CrispyBacon1999

Node version you have in the app settings is not available in Azure.

websolut avatar Jan 28 '22 15:01 websolut

you should install all nodejs, iisnode, and iis server same 64bit or 84-bit

ToNGocDuy avatar Jul 25 '22 21:07 ToNGocDuy