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

Deployment fails with "Could not load /Users/user/Nuxt/app/node_modules/unenv/runtime/npm/mime.mjs" error #438

Open
aerrata opened this issue Jan 24, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@aerrata
Copy link

aerrata commented Jan 24, 2025

Describe the bug

On a fresh nuxt project with nuxthub module installed, I'm getting this error when deploying;

[nitro 8:49:15 AM]  ERROR  Error: Could not load /Users/user/Nuxt/app/node_modules/unenv/runtime/npm/mime.mjs (imported by node_modules/@nuxthub/core/dist/runtime/blob/server/utils/blob.js): ENOENT: no such file or directory, open '/Users/user/Nuxt/app/node_modules/unenv/runtime/npm/mime.mjs'

The file /Users/user/Nuxt/imagene/node_modules/unenv/runtime/npm/mime.mjs is missing.

It appears that the unenv package was upgraded from version 1.10.0 to 2.0.0-rc.0 when I ran npx nuxthub deploy, resulting in changes to the package structure.

Or am I missing something here? Thanks.

Steps to reproduce

  1. Install nuxthub module on a fresh install nuxt, run;
npx nuxthub deploy
  1. Deployment will fail with the error above

Nuxt info

  • Operating System: Darwin
  • Node Version: v20.16.0
  • Nuxt Version: 3.15.2
  • CLI Version: 3.20.0
  • Nitro Version: 2.10.4
  • Package Manager: [email protected]
  • Builder: -
  • User Config: compatibilityDate, devtools, modules
  • Runtime Modules: @nuxthub/[email protected]
  • Build Modules: -
@aerrata aerrata added the bug Something isn't working label Jan 24, 2025
@pi0
Copy link

pi0 commented Jan 24, 2025

Do you have a sharable reproduction? 🙏🏼

@aerrata
Copy link
Author

aerrata commented Jan 24, 2025

Do you have a sharable reproduction? 🙏🏼

I have a Stackblitz link, but I can't login to the NuxtHub, might not be helpful I think. 😅

Btw, after some debugging, here is what i found;

I'm using bun currently, seems like bun add --dev wrangler upgrades the unenv package from 1.10.0 to 2.0.0-rc.0, causing the deploy error

Then, using npm, I deploy a fresh nuxt project with nuxthub module and wrangler installed, the error is gone.

So this might be an issue with bun maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants