-
Notifications
You must be signed in to change notification settings - Fork 27.4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Build Fails with Terser: Invalid Unicode Code Point Error #69263
Comments
also happens to me but only when building docker image, which is weird. i've tried alpine, debian and even archlinux as base images, same error my nextjs.config.js has nothing but rewrites in it using next 14.2.5 |
honestly I have no idea what the exact issue is. seems to be related to zod and/or openai-node project repo: https://github.com/eyenalxai/paste steps to reproduce:
i will try to pinpoint the issue in the meantime |
Can't be I've the same happen for this packages set:
Since you ain't using |
The same thing happened to me on when building Next.js on docker in Github Actions for Cypress E2E tests. https://github.com/cypress-io/github-action?tab=readme-ov-file#docker-image ▲ Next.js 14.2.5 Creating an optimized production build ... static/chunks/516-dd8f1e03298072f7.js from Terser |
The same thing happened when I built Nextjs on the @digitalocean app platform. static/chunks/f52d054b-e146e205a9860f66.js from Terser |
I think I've found a consistent way to trigger the error. One of these lines triggers the error, other does not: To reproduce:
This will result in an error. Then, swap the comments on the lines as follows:
Run |
I had the same issue. I used node-version: "20.10.0" which works for me. |
FWIW, I had no issues with my builds using Node version 20.17.0 up until 2 days ago, on August 23rd. So, it seems to be a very new issue with how strings are being parsed by Terser. I tried downgrading to Node version 20.10.0 as suggested by @C3ntraX, but still no luck |
I can confirm that the issue only happens when building my Next.js v14.2.6 app as a Docker image. I was able to isolate the file which causes the issue; however, I haven't made any significant changes since before this issue arose. I would share the file, but I think it is unnecessary, given my previous sentence. |
Catching the same problem - Nextjs 13.2.4 / Docker / Github actions / Nodejs slim 16
Tried versions 20.14.0 and 20.10.0 - did not solve the problem. As a temporary solution I disabled swc in next.config.js. |
Happening to me as well! Even locally on my mac..
|
My Next.js build using GitHub Actions fails on an API route as well. |
Downgrading node from |
Here's what my build logs from GitHub Actions look like:
Note that this build succeeded on the latest version of Next.js and Node.js prior to August 23rd. |
It builds successfully in local, but fails in ci/cd process like github actions.
I solved this issue temporarily thanks to comment I replied. However, the |
Yeah, I understand, but Sunday night is not the time for me to deal with this 😅 |
This is caused by Node.js 22.7.0, downgrading to Node.js 22.6.0 fixes this error. See #69150 |
- Workaround for the building issue with the current version of Node image (node:current-alpine) by using the 22.6 version of the Node image (node:22.6-alpine). (issue described on vercel/next.js#69263) - Update dependencies on package.json and package-lock.json. - Minor refactor on dashboard welcome page.
Same here deploying in @digitalocean, the solution was to downgrade the node version. So from package.json:
|
Had this problem with |
Getting the error across all my |
I choice to revisit the use of https://snyk.io/blog/choosing-the-best-node-js-docker-image/ Maybe it will help some of you to choose the most appropriate Node Docker image too. The authors of the article suggested using |
Solution for me was switching from 'node:bullseye' -> 'node:22.6-bullseye' in the docker image. node:bullseye started using 22.7.0 when it was available I guess and that made our pipeline explode |
Changing the docker image to |
Switching docker image from |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Link to the code that reproduces this issue
https://github.com/PBnJson/reproduction-template
To Reproduce
Current vs. Expected behavior
I expected the project to build and be minified but instead I had to disable minification with swcMinify:false in order to build successfully.
Provide environment information
Which area(s) are affected? (Select all that apply)
Runtime, Script (next/script)
Which stage(s) are affected? (Select all that apply)
Other (Deployed)
Additional context
I'm deploying in Google Cloud vm instance with Debian. The app was working great before I added the service workers. The error happens at
invalid unicode code point at line 1 column 43757
when I rundocker compose up --build
. DisablingswcMinify
in next.config.js got the build to succeed, so some sort of minification issue.reproduction-template
The text was updated successfully, but these errors were encountered: