You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot deploy my remix app with "@aws-sdk/credential-providers" to Cloudflare pages environment.
Error:
npm run deploy
✘ [ERROR] 1 error(s) and 0 warning(s) when compiling Worker.
✘ [ERROR] No matching export in "../node_modules/@aws-sdk/credential-providers/dist-es/index.browser.js" for import "fromIni"
../build/server/index.js:6:9:
6 │ import { fromIni } from "@aws-sdk/credential-providers";
╵ ~~~~~~~
✘ [ERROR] Build failed with 1 error:
../build/server/index.js:6:9: ERROR: No matching export in
"../node_modules/@aws-sdk/credential-providers/dist-es/index.browser.js" for import "fromIni"
I have confirmed that dist-es/index.js does have export * from "./fromIni"; while dist-es/index.browser.js not.
If my understanding is correct, index.js is supposed to be used because the code is for loader function which is on server-side, instead of index.browser.js.
../build/server/index.js:6:9: ERROR: No matching export in
"../node_modules/@aws-sdk/credential-providers/dist-es/index.browser.js" for import "fromIni"
🪵 Logs were written to "/Users/ikazoy/.wrangler/logs/wrangler-2024-10-21_06-42-22_059.log"
The text was updated successfully, but these errors were encountered:
Which Cloudflare product(s) does this pertain to?
Pages, Wrangler
What version(s) of the tool(s) are you using?
3.57.1 [Wrangler]
What version of Node are you using?
No response
What operating system and version are you using?
Mac Sonoma 14.6.1
Describe the Bug
Observed behavior
Cannot deploy my remix app with "@aws-sdk/credential-providers" to Cloudflare pages environment.
Error:
npm run deploy
I have confirmed that
dist-es/index.js
does haveexport * from "./fromIni";
whiledist-es/index.browser.js
not.If my understanding is correct,
index.js
is supposed to be used because the code is for loader function which is on server-side, instead ofindex.browser.js
.Expected behavior
Successful deployment without error.
Steps to reproduce
Here is a minimal codebase to reproduce the bug.
npm create cloudflare@latest -- my-remix-app --framework=remix
by following this pageimport { fromIni } from "@aws-sdk/credential-providers
and call it from the loader functionnpm run deploy
shows the errorThis is the code which cause the error.
Please provide a link to a minimal reproduction
https://github.com/ikazoy/cloudflare-remix-reproduction
Please provide any relevant error logs
$ npm run deploy
vite v5.4.9 building for production...
✓ 87 modules transformed.
build/client/.vite/manifest.json 1.49 kB │ gzip: 0.36 kB
build/client/assets/root-DTvCnnOP.css 6.76 kB │ gzip: 2.01 kB
build/client/assets/analytics.dashboard._dashboardId-CiI7Hsud.js 0.10 kB │ gzip: 0.12 kB
build/client/assets/root-Bv85obuH.js 1.73 kB │ gzip: 0.98 kB
build/client/assets/entry.client-K1NPw7Hx.js 3.74 kB │ gzip: 1.42 kB
build/client/assets/_index-DnPs6FvX.js 5.05 kB │ gzip: 2.06 kB
build/client/assets/jsx-runtime-56DGgGmo.js 8.11 kB │ gzip: 3.06 kB
build/client/assets/components-DCLLcppY.js 245.72 kB │ gzip: 79.30 kB
✓ built in 7.18s
vite v5.4.9 building SSR bundle for production...
✓ 7 modules transformed.
build/server/.vite/manifest.json 0.22 kB
build/server/assets/server-build-DTvCnnOP.css 6.76 kB
build/server/index.js 12.29 kB
✓ built in 470ms
▲ [WARNING] Warning: Your working directory is a git repo and has uncommitted changes
To silence this warning, pass in --commit-dirty=true
✘ [ERROR] 1 error(s) and 0 warning(s) when compiling Worker.
✘ [ERROR] No matching export in "../node_modules/@aws-sdk/credential-providers/dist-es/index.browser.js" for import "fromIni"
✘ [ERROR] Build failed with 1 error:
../build/server/index.js:6:9: ERROR: No matching export in
"../node_modules/@aws-sdk/credential-providers/dist-es/index.browser.js" for import "fromIni"
🪵 Logs were written to "/Users/ikazoy/.wrangler/logs/wrangler-2024-10-21_06-42-22_059.log"
The text was updated successfully, but these errors were encountered: