Skip to content

nuxi upgrade does not work any longer: Cannot find module #675

@ahoiroman

Description

@ahoiroman

Environment

  • Operating System: Darwin
  • Node Version: v20.18.1
  • Nuxt Version: 3.15.1
  • CLI Version: 3.20.0
  • Nitro Version: 2.10.4
  • Package Manager: pnpm@9.15.3
  • Builder: -
  • User Config: extends, modules, devtools, colorMode, runtimeConfig, routeRules, future, compatibilityDate, vite, typescript, hooks, eslint, i18n, sanctum
  • Runtime Modules: @nuxt/content@2.13.4, @nuxt/eslint@0.7.5, @nuxt/fonts@0.10.3, @nuxt/image@1.9.0, @nuxt/ui@2.21.0, @nuxthq/studio@2.2.1, @vueuse/nuxt@12.4.0, nuxt-og-image@3.1.1, @nuxtjs/i18n@9.1.1, nuxt-auth-sanctum@0.5.4, nuxt-laravel-echo@0.2.1, @nuxtjs/seo@2.0.0-rc.23
  • Build Modules: -

Reproduction

-

Describe the bug

If I run nuxi upgrade, the following happens:

~/Entwicklung/Nuxt/example-frontend git:[next_gen]
nuxi upgrade
[nuxi 1:39:01 PM] ℹ Package manager: pnpm 9.15.3
[nuxi 1:39:01 PM] ℹ Current Nuxt version: 3.15.1

✔ Would you like to recreate node_modules and pnpm-lock.yaml to
fix problems with hoisted dependency versions and ensure you
have the most up-to-date dependencies?
Yes
[nuxi 1:39:02 PM] ℹ Recreating node_modules and pnpm-lock.yaml. If you encounter any issues, revert the changes and try with --no-force
[nuxi 1:39:05 PM] ℹ Installing latest stable Nuxt 3 release...

[1:39:05 PM]  ERROR  Cannot find module '/Users/ahoi/Entwicklung/Nuxt/example-frontend/node_modules/.pnpm/nuxi@3.20.0/node_modules/nuxi/dist/chunks/main.mjs' imported from /Users/ahoi/Entwicklung/Nuxt/example-frontend/node_modules/.pnpm/nuxi@3.20.0/node_modules/nuxi/dist/shared/nuxi.u_uB65ir.mjs

    at finalizeResolution (node:internal/modules/esm/resolve:265:11)
    at moduleResolve (node:internal/modules/esm/resolve:933:10)
    at defaultResolve (node:internal/modules/esm/resolve:1169:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:542:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:510:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:239:38)
    at ModuleLoader.import (node:internal/modules/esm/loader:472:34)
    at defaultImportModuleDynamicallyForModule (node:internal/modules/esm/utils:214:31)
    at importModuleDynamicallyCallback (node:internal/modules/esm/utils:253:12)
    at node_modules/.pnpm/nuxi@3.20.0/node_modules/nuxi/dist/shared/nuxi.u_uB65ir.mjs:30:66 



[1:39:05 PM]  ERROR  Cannot find module '/Users/ahoi/Entwicklung/Nuxt/example-frontend/node_modules/.pnpm/nuxi@3.20.0/node_modules/nuxi/dist/chunks/main.mjs' imported from /Users/ahoi/Entwicklung/Nuxt/example-frontend/node_modules/.pnpm/nuxi@3.20.0/node_modules/nuxi/dist/shared/nuxi.u_uB65ir.mjs

After that, the lock file is empty, too.

It does not happen, if I use --no-force

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions