Skip to content

docs: update command for pnpm to use pnpx#90590

Open
pkuczynski wants to merge 1 commit intovercel:canaryfrom
pkuczynski:patch-1
Open

docs: update command for pnpm to use pnpx#90590
pkuczynski wants to merge 1 commit intovercel:canaryfrom
pkuczynski:patch-1

Conversation

@pkuczynski
Copy link
Contributor

No description provided.

@nextjs-bot nextjs-bot added the Documentation Related to Next.js' official documentation. label Feb 26, 2026
@nextjs-bot
Copy link
Collaborator

Allow CI Workflow Run

  • approve CI run for commit: dd438c5

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer


```bash filename="Terminal" package="pnpm"
pnpm next experimental-analyze
pnpx next experimental-analyze
Copy link
Collaborator

@icyJoseph icyJoseph Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the same thing. pnpx is an alias for pnpm dlx which will pull latest Next.js from registry and use it in place. It may differ from the actual version you have installed, and that leads to unexpected behaviors.

  • Aliases: pnpx is an alias for pnpm dlx

Fetches a package from the registry without installing it as a dependency, hotloads it, and runs whatever default command binary it exposes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have it installed already, it does not fetch it. It's pretty the same as npx. The command pnpm next did not work for me...

Copy link
Collaborator

@icyJoseph icyJoseph Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What pnpm version, or Next.js did you use?

Screenshot 2026-02-26 at 16 20 59

I remember testing this, on a project with say, v16.1.0, and pnpx next would run 16.1.6 from registry.

The info command can help to test this, pnpm next info is running it from your project, so if you have 16.1.4 for example it'll print that, but then pnpx next info would print 16.1.6, latest available from registry.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be clear, I am all in to get to the bottom of this, and if that requires docs changes, let's go! but I need to be know exactly what's going on. As said, I've run, and can easily repro, this kind of behavior where pnpx points to a different next binary. That can break builds and such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Related to Next.js' official documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants