Help using pnpm
Unanswered
Sun bear posted this in #help-forum
Sun bearOP
Hello,
I am new to Node and Next and have been tinkering with them for a couple of weeks. I have had quite a few things working.
Today I decided to transition from nvm and npm to using pnpm. However I consistently fail at the last step when I run the dev script:
I have googled and looked through my configuration and am frankly stuck. Is there some basic npm confoiguration that I am missing?
I would greatly appreciate any points or guidance to help solve this issue.
I am new to Node and Next and have been tinkering with them for a couple of weeks. I have had quite a few things working.
Today I decided to transition from nvm and npm to using pnpm. However I consistently fail at the last step when I run the dev script:
dude@his-machine-Ubuntu:~/aaanasds723/Dev/scratch/hlf$ pnpm dev
> hlf@0.1.0 dev /home/dude/his-machine/Dev/scratch/hlf
> next dev
sh: 1: next: not found
ELIFECYCLE Command failed.I have googled and looked through my configuration and am frankly stuck. Is there some basic npm confoiguration that I am missing?
I would greatly appreciate any points or guidance to help solve this issue.
dude@his-machine-Ubuntu:~/his-machine/Dev/scratch/hlf$ pnpm devhlf@0.1.0 dev /home/dude/his-machine/Dev/scratch/hlf
next dev
sh: 1: next: not foundELIFECYCLE Command failed.dude@his-machine-Ubuntu:~/his-machine/Dev/scratch/hlf$ ls -altotal 20drwxr-xr-x 2 dude dude 0 May 23 18:26 appdrwxr-xr-x 2 dude dude 0 May 23 22:12 node_modules-rwxr-xr-x 1 dude dude 281 May 23 22:12 package.json-rwxr-xr-x 1 dude dude 8566 May 23 22:12 pnpm-lock.yamldude@his-machine-Ubuntu:~/his-machine/Dev/scratch/hlf$ ls -al node_modules/total 16-rwxr-xr-x 1 dude dude 2306 May 23 22:12 .modules.yamllrwxrwxrwx 1 dude dude 79 May 23 22:11 next -> .pnpm/next@14.2.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/nextdrwxr-xr-x 2 dude dude 0 May 23 22:12 .pnpmlrwxrwxrwx 1 dude dude 37 May 23 22:12 react -> .pnpm/react@18.3.1/node_modules/reactlrwxrwxrwx 1 dude dude 58 May 23 22:12 react-dom -> .pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-domdude@his-machine-Ubuntu:~/his-machine/Dev/scratch/hlf$ printenvPNPM_HOME=/home/dude/.local/share/pnpmPATH=/home/dude/.local/share/pnpm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin23 Replies
Sun bearOP
Thanks @!=tgt ! I tried that several times and once more today after seeing your message. But without success.
Hm, weird
try deleting the folder and then running
pnpm store pruneSun bearOP
I created that project following the "manual installation" instructions at: https://nextjs.org/docs/getting-started/installation but using pnpm instead of npm
Then I tried using the automated installation using
Same outcome. So I am next going to try what you just suggested...
Then I tried using the automated installation using
pnpm create next-appSame outcome. So I am next going to try what you just suggested...
@!=tgt try deleting the folder and then running `pnpm store prune`
Sun bearOP
By "the folder" do you mean the project or
node_modules?Sun bearOP
Assuming you meant
1. Delete the
2. Ran
3. Then re-installed
Still no luck
node_modules, I tried again: 1. Delete the
node_modules folder2. Ran
pnpm store prune3. Then re-installed
next@latest react@latest react-dom@latestStill no luck
ok that's weird
Sun bearOP
I am entirely stumped
Guess it is more googling... and posting around....
Do you think it may be am artefact of having used nvm and npm before?
Do you think it may be am artefact of having used nvm and npm before?
no
Sun bearOP
Hmmm (these stickers are weird
)
)Sun bearOP
Hey @!=tgt , would you mind running the two commands below and share the results - I am curious to see if my pnpm config is not right.
dude@his-machine-Ubuntu:~/his-machine/Dev/scratch/hlf$ pnpm config listregistry=https://registry.npmjs.org/user-agent=pnpm/9.1.2 npm/? node/v18.5.0 linux x64dude@his-machine-Ubuntu:~/his-machine/Dev/scratch/hlf$ pnpm doctor*WARN* Load npm builtin configs failed. If the prefix builtin config does not work, you can use "pnpm config list" to show builtin configs. And then use "pnpm config --global set <key> <value>" to migrate configs from builtin to global.mine's the exact same
except UA which is mac
Sun bearOP
Thank you @!=tgt !
Sun bearOP
Does anybody know if it is ok to create a project on a SMB-mounted folder while pnpm is installed in the local home folder?
Sun bearOP
Confirmed: it works if I create the project on local file system - it does not work if project is created on a mounted SMB file system.
My guess is it is related to hard- and soft-linking used by pnpm
Sun bearOP
I have struggled with this issue all day without success.
My setup is:
1. My Linux home is on an Ubuntu virtual machine
2. I mount a smb file system
3. All my software development takes place on the smb file system
4. Above works fine with npm
5. Does not work with pnpm (but works if the project folder in my VM's local filesystem)
pnpm is installed in my VM's home directory (~/.local/share/).
So based on reading up all day, I tried two things:
1. Kept pnpm in the VM's home directory but added a store-dir to a npmrc (~/.config/pnpm/rc) --> this did not work
2. Relocated the pnpm home to the top of the SMB mount --> this did not work either
So I am stumped at the moment.
And would appreciate any help!
My setup is:
1. My Linux home is on an Ubuntu virtual machine
2. I mount a smb file system
3. All my software development takes place on the smb file system
4. Above works fine with npm
5. Does not work with pnpm (but works if the project folder in my VM's local filesystem)
pnpm is installed in my VM's home directory (~/.local/share/).
So based on reading up all day, I tried two things:
1. Kept pnpm in the VM's home directory but added a store-dir to a npmrc (~/.config/pnpm/rc) --> this did not work
2. Relocated the pnpm home to the top of the SMB mount --> this did not work either
So I am stumped at the moment.
And would appreciate any help!