-
Notifications
You must be signed in to change notification settings - Fork 27k
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: path issues on linux machines when build created on windows #58398
Conversation
Im looking forward to have this fix :) |
Do you have any update on getting this merged? A lot of us are waiting for this tiny fix🙏 |
Looking forward to this! |
Hi @ztanner or anyone, sorry for the ping, but could we get a review? It's a one-line fix so it should only take a few minutes of your time, and help a lot of people. |
@ztanner Following suit from @alexop1000 Pinging this too as it is still happening on Dec 30. |
Pinging this to follow up, this is still happening. Please take a look into this as this is simple fix |
Yes, please... just merge this PR for the sake of all of us. |
Hey, thanks for looking into this! I just had a look and this change looks fine, it seems the tests did not run because of the branch not being editable and I can't trigger a branch update either, probably because it was opened on an organization instead of an individual. I've opened #60116 so that this change can be landed, you'll be credited in the same way, as it's the same commits. |
Copy of #58398 with `normalizePathSep` applied. Unfortunately the branch wasn't editable, I'm guessing because it was opened on an organization instead of an individual. Fixes #58244 Closes #58398 <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Closes NEXT-1943 --------- Co-authored-by: keyur2582 <[email protected]>
…el#60116) Copy of vercel#58398 with `normalizePathSep` applied. Unfortunately the branch wasn't editable, I'm guessing because it was opened on an organization instead of an individual. Fixes vercel#58244 Closes vercel#58398 <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Closes NEXT-1943 --------- Co-authored-by: keyur2582 <[email protected]>
What?
The user gets an internal error 500 when visiting your website. You get "Error: Cannot find module 'next/dist\client\components\static-generation-async-storage-external.js'" on server logs. The specifics can be found in #56010.
Why?
If build was created on windows it is using '\' in the paths whereas it has to be replaced with '/'. If the same build is deployed to linux based machines like app engine, it throws the error above.
How?
By replacing
return
commonjs ${localRes.replace(/.*?next[/\]dist/, "next/dist")}with
returncommonjs ${localRes.replace(/.*?next[/\\]dist/, "next/dist").replace(/\\/g, "/")}`` in
next\build\handle-externals.js`Closes NEXT-58244
Fixes #58244
-->