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

Error with deploy command #485

Open
franciscohermida opened this issue Feb 26, 2025 · 7 comments
Open

Error with deploy command #485

franciscohermida opened this issue Feb 26, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@franciscohermida
Copy link

Describe the bug
when running:
pnpm dlx nuxthub@latest deploy --dotenv .env.production

getting this error:

Error: Could not load MY_PROJ_FOLDER\node_modules\.pnpm\[email protected]\node_modules\unenv\runtime\npm\consola.mjs (imported by ../../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]_@[email protected][email protected]_ligh_yls2bhkkd65pynqcukfwa6n6ky/node_modules/@nuxt/icon/dist/runtime/server/api.js): ENOENT: no such file or directory, open 'MY_PROJ_FOLDER\node_modules\.pnpm\[email protected]\node_modules\unenv\runtime\npm\consola.mjs'

Steps to reproduce

  1. pnpm dlx nuxthub@latest deploy --dotenv .env.production

Expected behavior
Deploy should work

@franciscohermida franciscohermida added the bug Something isn't working label Feb 26, 2025
Copy link
Contributor

atinux commented Feb 26, 2025

Does this work with npx nuxthub deploy?

@franciscohermida
Copy link
Author

Does this work with npx nuxthub deploy?

same issue

@atinux
Copy link
Contributor

atinux commented Mar 1, 2025

What id the result of npx nuxi info?

@narr07
Copy link

narr07 commented Mar 2, 2025

same issue, this

- Operating System: Darwin
- Node Version:     v22.14.0
- Nuxt Version:     3.15.4
- CLI Version:      3.22.2
- Nitro Version:    2.10.4
- Package Manager:  [email protected]
- Builder:          -
- User Config:      modules, css, nitro, compatibilityDate, devtools, future
- Runtime Modules:  @nuxt/[email protected], @nuxt/[email protected], @nuxthub/[email protected]
- Build Modules:    -

After I investigated, it turned out that because the wrangler.

error on wrangler version "wrangler": "^3.111.0"

and solved when using "wrangler": "^3.101.0"

This for following the guide https://hub.nuxt.com/docs/getting-started/installation#add-to-a-nuxt-project

@franciscohermida
Copy link
Author

franciscohermida commented Mar 2, 2025

What id the result of npx nuxi info?

- Operating System: Windows_NT
- Node Version:     v23.7.0
- Nuxt Version:     3.15.4
- CLI Version:      3.21.1
- Nitro Version:    2.10.4
- Package Manager:  [email protected]
- Builder:          -
- User Config:      compatibilityDate, future, ssr, modules, hub, runtimeConfig, typescript, router, shadcn, content, devtools
- Runtime Modules:  @nuxthub/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected], @vueuse/[email protected], @vueuse/motion/[email protected], [email protected], @pinia/[email protected], @pinia/[email protected]    
- Build Modules:    -

Tried downgrading wrangler as suggested by @narr07 and it didn't work for me, then I updated to latest wrangler version 3.111 and somehow it worked.

The version of wrangler when it wasn't work was: 3.109.2

Deploying has been unstable for me even before this issue, my project is a pnpm monorepo and this app is one of many, not sure if this affects anything.

Not sure if this issue should be closed.

Copy link
Contributor

atinux commented Mar 18, 2025

What about wrangler v4?

@pi0
Copy link

pi0 commented Mar 18, 2025

Recreating lockfile, making sure to use latest nuxt version should resolve most of issues related to hoisted versions (wrangler has it's own new hoist protection mechanism, so upgrading it should also help)

If still you have issues and sharing full reproduction is not possible, sharing pnpm why unenv output can be helpful.

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

4 participants