docs: update command for pnpm to use pnpx#90590
docs: update command for pnpm to use pnpx#90590pkuczynski wants to merge 1 commit intovercel:canaryfrom
Conversation
|
Allow CI Workflow Run
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
What pnpm version, or Next.js did you use?
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.
There was a problem hiding this comment.
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.
No description provided.