-
Notifications
You must be signed in to change notification settings - Fork 22
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
[wrangler] "default" is not exported by "node_modules/unenv/runtime/polyfill/process.mjs" #260
Comments
Are you force resolving unenv to nighyly version in your Nitro project? |
No , I just install nuxt using Bun with this command: bun create cloudflare@latest my-nuxt-app -- --framework=nuxt |
You have mentioned Can you please share |
I just saw, It's one of wrangler's depencies:
It was changed in this commit: cloudflare/workers-sdk@1e68fe5 |
Interesting. Is this some kind of weird npm package hoisting issue? I've just tested the repro with pnpm and it works just fine for me, and I see
|
Could you try to use pnpm or somehow tell bun not to hoist packages (I'm not a bun user, but I hope there is a way to do that). @pi0 we could try to bundle unenv-nightly into Wrangler but it's tricky because unenv has built-time and runtime component and we currently get the runtime-component from the npm package (the built-time part is already bundled into the wrangler bundle). |
When I install unenv as a dev dependency (version 1.9.0) the error goes way. |
@jvbianchi which suggests that bun's package hoisting is the culprit here. |
Thanks for report dear @jvbianchi As you have already figured out, adding latest ( For the followup:
|
I have the same Issue with @nuxtjs/sitemap...
dependencies:
nuxt 3.13.2
├─┬ @nuxt/vite-builder 3.13.2
│ ├─┬ h3 1.13.0
│ │ └── unenv 1.10.0
│ └── unenv 1.10.0
├─┬ h3 1.13.0
│ └── unenv 1.10.0
├─┬ impound 0.1.0
│ └── unenv 1.10.0
├─┬ nitropack 2.9.7
│ ├─┬ h3 1.13.0
│ │ └── unenv 1.10.0
│ ├─┬ listhen 1.9.0
│ │ └─┬ h3 1.13.0
│ │ └── unenv 1.10.0
│ ├── unenv 1.10.0
│ └─┬ unstorage 1.12.0
│ ├─┬ h3 1.13.0
│ │ └── unenv 1.10.0
│ └─┬ listhen 1.9.0
│ └─┬ h3 1.13.0
│ └── unenv 1.10.0
└── unenv 1.10.0
devDependencies:
@nuxtjs/sitemap 6.1.2
└─┬ h3-compression 0.3.2
└─┬ h3 1.13.0 peer
└── unenv 1.10.0 |
Environment
cloudflare pages
Reproduction
try to deploy Nuxt to cloudflare pages using the /server/api/hello.ts folder with a simple test
Describe the bug
"default" is not exported by "node_modules/unenv/runtime/polyfill/process.mjs"
Additional context
unenv-nightly version 1.10.0-1717606461.a117952
Logs
The text was updated successfully, but these errors were encountered: