pnpm icon indicating copy to clipboard operation
pnpm copied to clipboard

Issues with permissions on macOS

Open cupcakearmy opened this issue 3 years ago • 4 comments

pnpm version:

7.2.1 and 6.32.22

Code to reproduce the issue:

pnpm -g ls

Expected behavior:

I can use the -g to add ls and so on

Actual behavior:

Does not work.

 EACCES: permission denied, mkdir '/Users/<my-user-name>/Library/pnpm'

Additional information:

  • node -v prints: v16.15.1
  • Windows, macOS, or Linux?: macOS

cupcakearmy avatar Jun 16 '22 08:06 cupcakearmy

What installation method were you using to install pnpm?

zkochan avatar Jun 17 '22 00:06 zkochan

Tried both the script and with npm -g

cupcakearmy avatar Jun 17 '22 07:06 cupcakearmy

I cannot reproduce this on macOS Big Sur + the same Node version.

Output of the command is the following:

$ pnpm -g ls

Legend: production dependency, optional only, dev only

/Users/<user>/Library/pnpm/global/5

dependencies:
pnpm 7.3.0

mcmxcdev avatar Jun 24 '22 19:06 mcmxcdev

I've had a very similar bug when upgrading from 7.5.0 to 7.11.0, using a turborepo monorepo and remix. Every package was working as intended, bug remix failed to start with this log:

portal:dev: 
portal:dev: > portal@ dev /Users/phil/Projects/projectname/apps/portal
portal:dev: > cross-env PORT=3001 remix dev
portal:dev: 
portal:dev: node:events:505
portal:dev:       throw er; // Unhandled 'error' event
portal:dev:       ^
portal:dev: 
portal:dev: Error: spawn remix EACCES
portal:dev:     at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
portal:dev:     at onErrorNT (node:internal/child_process:478:16)
portal:dev:     at processTicksAndRejections (node:internal/process/task_queues:83:21)
portal:dev: Emitted 'error' event on ChildProcess instance at:
portal:dev:     at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
portal:dev:     at onErrorNT (node:internal/child_process:478:16)
portal:dev:     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
portal:dev:   errno: -13,
portal:dev:   code: 'EACCES',
portal:dev:   syscall: 'spawn remix',
portal:dev:   path: 'remix',
portal:dev:   spawnargs: [ 'dev' ]
portal:dev: }
portal:dev:  ELIFECYCLE  Command failed with exit code 1.
portal:dev: command finished with error, but continuing...

PhilippMolitor avatar Sep 19 '22 12:09 PhilippMolitor

same here, and this don't show every macos, hard to figure out why

takeTrace avatar Dec 11 '22 15:12 takeTrace