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

Fix for incorrect filter logic when copying traced files #441

Conversation

vladiulianbogdan
Copy link
Contributor

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".

Copy link

changeset-bot bot commented Jun 11, 2024

⚠️ No Changeset found

Latest commit: 45a9b18

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

Copy link

vercel bot commented Jun 11, 2024

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

Copy link
Collaborator

@conico974 conico974 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.
I think this is fine for now and will fix most issues, but we need to find a better way to do this. If someone needs caniuse-lite for example, we should have a way to include it in this case

@conico974 conico974 merged commit 3ff4909 into opennextjs:main Jun 14, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants