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

SyntaxError: Unexpected token { #688

Open
CrispyBacon1999 opened this issue Aug 17, 2021 · 3 comments
Open

SyntaxError: Unexpected token { #688

CrispyBacon1999 opened this issue Aug 17, 2021 · 3 comments

Comments

@CrispyBacon1999
Copy link

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

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

@ToNGocDuy
Copy link

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

@lextm
Copy link

lextm commented Nov 6, 2024

The current version of iisnode does not support ES6 Modules syntax, so such issues cannot easily fix. You should switch to an alternative. Read Azure#146 to learn more.

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

4 participants