Skip to content

Run pnpm nuxt upgrade in monorepo #951

Closed

Description

@dwightjack

I have a pnpm monorepo including a Nuxt3 application with the following structure:

packages/
    app/
        package.json <-- nuxt is defined here 
pnpm-lock.yaml

If I run pnpm --filter=app exec nuxt upgrade --dedupe, the Nuxt CLI cannot locate the lock file.

$ pnpm --filter=app exec nuxt upgrade --dedupe
ℹ Package manager: pnpm 9.3.0                                                                                                       
ℹ Current Nuxt version: 3.17.5                                                                                      

 ERROR  Unable to find any lock files in /.../packages/app

My guess is that the command should traverse up to locate the correct lock file. Looking at the source code, I wonder if this might even be an issue with the https://github.com/unjs/nypm package 🤔

Any hint on how to solve the issue?

Activity

  1. samiashi commented on Feb 17, 2026

    @samiashi

    I’m also running into this in a monorepo, even with npm.

    Setup

    • Nuxt: 4.3.1
    • npm: 10.9.4
    • Command run from app dir: npx nuxt upgrade --dedupe
    • Repo layout:
      • apps/web/package.json
      • apps/web/package-lock.json
      • no JS lockfile at monorepo root

    What happens

    From apps/web/, nuxt upgrade prints:

    Unable to find any lock files in ...

    It looks like lockfile detection is checking the workspace root instead of the current app directory. In my case the lockfile exists in the app directory, so the message is misleading.

  2. danielroe commented on Mar 10, 2026

    @danielroe
    Member

    I can't reproduce this.

    can you provide a sample repository? 🙏

  3. samiashi commented on Mar 11, 2026

    @samiashi

    @danielroe I put together a minimal reproduction repo here:

    https://github.com/samiashi/nuxt-upgrade-lockfile-repro

    It mirrors the nested repo shape where I hit this:

    • repo root is a git repo
    • frontend Nuxt app lives in fe/
    • backend placeholder lives in be/
    • there is no root JS lockfile
    • fe/package-lock.json exists

    Repro steps:

    cd fe
    npm install
    npx nuxt upgrade --dedupe
  4. added theissue type on Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions