Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pnpm install at macOS will cause error because of permission #262

Closed
tim80411 opened this issue Jul 13, 2023 · 2 comments
Closed

pnpm install at macOS will cause error because of permission #262

tim80411 opened this issue Jul 13, 2023 · 2 comments

Comments

@tim80411
Copy link

tim80411 commented Jul 13, 2023

Enviroment

OS: Mac M1 Max Ventura 13.2.1
node: 18.14.2
package manager: pnpm 8.5.1
package version: 2.1.0

Reproduce

  1. pnpm store should have node-ffprobe-installer
  2. delete node_module and reinstall package by pnpm
  3. Permission error happened

Context

When using pnpm to install package.
Shell "ffprobe" will be download at ~/{projectPath}/node_modules/.pnpm/@ffprobe-installer+ffprobe@2.1.0/node_modules/@ffprobe-installer/darwin-arm64

image

As you can with the picture below, shell ffprobe permission did not change with the script postinstall

I believe that it comes from pnpm v7 change: default open 「side-effects-cache」
And here is pnpm issue reference.

Solution

Add side-effects-cache=false in the .npmrc should work.

But it will let us losing some benefit of using pnpm.

@SavageCore
Copy link
Owner

Thanks for the issue, please try v2.1.1 and let me know how you get on!

@tim80411
Copy link
Author

tim80411 commented Sep 27, 2023

@SavageCore It seems like it can not work on the inner module.
But it works fine on the root project's .npmrc.
Maybe we can mention this solution for pnpm users at the README.

# .npmrc
side-effects-cache=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants