SWC download fails because of a missing trailing slash in the custom registry #39419
Closed
1 task done
Labels
bug
Issue was opened via the bug report template.
Verify canary release
Provide environment information
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
While building the production site (with "next build") on our CI, I get this error:
After digging, I found
npm config get registry
can return a value without a trailing slash, something like :http://artifactory.private.domain/artifactory/api/npm/all-npm
And the download code assumes a trailing slash:
next.js/packages/next/lib/download-wasm-swc.ts
Lines 81 to 90 in 5d93753
Expected Behavior
Since I cannot change the npm settings on my CI, i wonder if the NextJs script can be more resilient by checking the result of the command
npm config get registry
: if the string does not end with a/
, it adds it before callingfetch
Link to reproduction
none
To Reproduce
Have npm settings with a custom URL registry without the trailing slash.
Build the production bundle.
The text was updated successfully, but these errors were encountered: