Syntax Error in Next.js v13.5.4 Deployment on IIS Server (Windows)

I am experiencing difficulties deploying my Next.js v13 application on a Windows Server running IIS. After deployment, I encounter a syntax error that prevents the application from running properly. Specifically, I cannot locate main-app.js in the /next folder as expected. Here are the details of the issue:

Error Description: After deploying my Next.js v13 application on a Windows Server with IIS, I encounter a syntax error. The error message indicates a problem with the JavaScript syntax, but I cannot locate main-app.js in the /next folder where it’s typically found. This is hindering my ability to pinpoint and fix the issue.

Deployment Environment: I am deploying on a Windows Server running IIS. I have followed the standard deployment procedures for Next.js applications, including building the project (npm run build) and configuring IIS to serve the application.

Next.js Version: I am using Next.js v13.5.4.

Error Code:

line 28. eval(webpack_require_.ts(“n/**n* MIT License n n Copyright (c) Facebook, Inc. and its affiliates. n n* Permission is hereby granted, free of charge, to any person obtaining a copyn* of this software and associated documentation files (the “Software”), to dealn* in the Software without restriction, including without limitation the rights n* to use, copy, modify, merge, publish, distribute, sublicense, and/or selln* copies of the Software, and to permit persons to whom the Software isn* furnished to do so, subject to the following conditions: n n The above copyright notice and this permission notice shall be included in alln copies or substantial portions of the Software. n n THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS ORn IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, n* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE n* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERn* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, n* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE n* SOFTWARE. n /nvar _importDefault (this && this.__importDefault) || function (mod) {n return (mod && mod._esModule) ? mod: {“default”: mod };n}; nObject.define Property (exports, “_esModule”, ({ value: true }));n// This file is copied from the Metro JavaScript bundler, with minor tweaks for n// webpack 4 compatibility. n//n// https://github.com/facebook/metro/blob/d6b9685c730d0d63577db40f41369157f28dfa3a/packages/metro/src/lib/polyfills/require.js nconst runtime_1 = _importDefault(webpack_require(/! next/dist/compiled/react-refresh/runtime */”(app-pages-browser) /./node_modules/next/dist/compiled/react-refresh/runtime.js”));nfunction isSafeExport (key) {n return (key === ‘_esModule’ || n // TODO: remove this key from page config instead of allow listing itn ===

Expectations: I am seeking guidance on how to resolve this syntax error and locate main-app.js or understand where the issue might be originating from in the deployment process on a Windows environment.

If anyone has encountered similar issues deploying Next.js applications on Windows Servers with IIS or has insights into how to debug and resolve syntax errors in this context, I would greatly appreciate your assistance. Thank you!

New contributor

Hammad Azam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật