sst / open-next

Open source Next.js serverless adapter
https://open-next.js.org
MIT License
3.7k stars 111 forks source link

Fix for incorrect filter logic when copying traced files #441

Closed vladiulianbogdan closed 2 weeks ago

vladiulianbogdan commented 3 weeks ago

This fixes a bug that I encountered while deploying this application.

The problem is that the code uses a file from the highlight.js module called csharp.js. When I deploy the application built by open-next, I encounter the following error at runtime: Cannot find module 'highlight.js/lib/languages/csharp'.

I found that the reason for this error is an early return from copyTracedFiles.ts, which is falsely skipping the file .next/standalone/node_modules/highlight.js/lib/languages/csharp.js.

The solution that I propose is to skip if the path contains "node_modules/sharp" and "node_modules/canius-lite".

changeset-bot[bot] commented 3 weeks ago

⚠️ No Changeset found

Latest commit: 45a9b18411432ffe07ec945770d8b1d7e819a02a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
open-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2024 0:02am