Skip to content

Pnpm install errors #13

Description

@shide1989

Context

Using pnpm, there are errors because recent version of pnpm require pnpm approve-builds to allow dependencies to run scripts.
This makes the pnpm dev command fail with exit code 1.

Proposed solution

I had to add a pnpm-workspace.yaml file to allow the following deps :

allowBuilds:
  sharp: true
  unrs-resolver: true

I would propose to add this file to the repo for pnpm users not to have these errors.

Error outputs

❯ pnpm dev
Lockfile is up to date, resolution step is skipped
Already up to date
[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: sharp@0.34.5, unrs-resolver@1.12.2

Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.
[ERROR] Command failed with exit code 1: pnpm install

pnpm: Command failed with exit code 1: pnpm install
    at getFinalError (file:///opt/homebrew/Cellar/pnpm/11.5.2/libexec/lib/node_modules/pnpm/dist/pnpm.mjs:34089:14)
    at makeError (file:///opt/homebrew/Cellar/pnpm/11.5.2/libexec/lib/node_modules/pnpm/dist/pnpm.mjs:36396:21)
    at getSyncResult (file:///opt/homebrew/Cellar/pnpm/11.5.2/libexec/lib/node_modules/pnpm/dist/pnpm.mjs:38240:10)
    at spawnSubprocessSync (file:///opt/homebrew/Cellar/pnpm/11.5.2/libexec/lib/node_modules/pnpm/dist/pnpm.mjs:38200:14)
    at execaCoreSync (file:///opt/homebrew/Cellar/pnpm/11.5.2/libexec/lib/node_modules/pnpm/dist/pnpm.mjs:38130:23)
    at callBoundExeca (file:///opt/homebrew/Cellar/pnpm/11.5.2/libexec/lib/node_modules/pnpm/dist/pnpm.mjs:40658:23)
    at boundExeca (file:///opt/homebrew/Cellar/pnpm/11.5.2/libexec/lib/node_modules/pnpm/dist/pnpm.mjs:40635:49)
    at sync (file:///opt/homebrew/Cellar/pnpm/11.5.2/libexec/lib/node_modules/pnpm/dist/pnpm.mjs:40790:14)
    at runPnpmCli (file:///opt/homebrew/Cellar/pnpm/11.5.2/libexec/lib/node_modules/pnpm/dist/pnpm.mjs:218403:5)
    at runDepsStatusCheck (file:///opt/homebrew/Cellar/pnpm/11.5.2/libexec/lib/node_modules/pnpm/dist/pnpm.mjs:220133:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions