Urgent.News

What's breaking now, across hundreds of outlets.

Tech

`pnpm dev` échoue à cause de `sharp` : l'avertissement qui bloque tout

Je lance pnpm dev et rien ne démarre. Pas d'erreur dans mon code. Juste ça : [ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: sharp@0.34.5 Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts. [ERROR] Command failed with exit code 1: pnpm install Avant de lancer le script, pnpm vérifie l'état des dépendances. Cette vérification échouait, donc le serveur ne partait…

Original French Read in English

When attempting to launch `pnpm dev`, users encountered an issue where the process failed to start. The error message displayed was "[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: sharp@0.34.5". Running "pnpm approve-builds" was suggested as a solution to determine which dependencies should be permitted to execute scripts. Before initiating the script, `pnpm` would inspect the status of dependencies; however, this check failed, causing the server never to launch.

Recent versions of `pnpm` no longer run installation scripts for dependencies without explicit approval. The setting `allowBuilds`, introduced in 10.26, allows users to approve these scripts. Any unlisted package is treated as unverified and defaults to producing an error. `sharp`, an image optimization tool utilized by Next.js, had a script responsible for installing its native binary.

The user's `pnpm-workspace.yaml` file contained an unfulfilled location: `allowBuilds : sharp : set this to true or false`. The remedy involved setting `allowBuilds : sharp : true`, which allowed the `sharp` script to run, subsequently enabling `pnpm dev` to begin again. Alternatively, `pnpm approve-builds` could be used, which writes either "true" for an approved package or "false" for a denied one.

Users were advised against using `dangerouslyAllowAllBuilds`, as it permits all scripts, including those of future transitive dependencies. Running an installation script with elevated privileges meant that it was preferable to approve each script individually. Amine Affif, a full-stack developer based in Paris, shared his experience on amineaffif.com.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

How we plan a platform before writing the first line of code

Most projects that go wrong do not fail in the code. They fail in a meeting months earlier, when everyone nodded at a sentence that meant something different to each person.

  • Establish a concise goal sentence for the platform
  • Identify key users and their needs, devices, and interaction frequency
  • Draft a scope document detailing included and excluded features

AWS Lambda Doubles Its Timeout to 30 Minutes After Eight Years at 15

AWS has raised the maximum timeout of on-demand Lambda Event Functions from 15 to 30 minutes in all commercial regions, with no opt-in and no new pricing. The limit had stood since 2018.

  • AWS Lambda doubles its maximum execution time from 15 to 30 minutes.
  • Change effective since August 2017, impacting synchronous and asynchronous invocations.
  • Longer tasks advised to use AWS Step Functions for better manageability.

More from Wednesday 25 November →