From 014ec7d50a4b6d82b29dda647e060208d3107c82 Mon Sep 17 00:00:00 2001 From: Zakaria Rahali <119002492+zak-li@users.noreply.github.com> Date: Wed, 29 Jul 2026 08:53:35 +0100 Subject: [PATCH] docs(install): npm 12 blocks openclaw install scripts by default (#115224) The documented `npm install -g openclaw@latest` does not run OpenClaw's preinstall/postinstall steps on npm 12, which blocks package lifecycle scripts by default. Nothing in the install docs mentioned this. Adds a note to the npm tab with the working command. The pnpm tab already documents its equivalent (`pnpm approve-builds -g`), so npm was the only tab without one. Scoped to npm 12 rather than 11.16: `strict-allow-scripts` is undefined on npm 11.12.1 and false on both 11.16.0 and 12.0.1, and only npm 12 reports the scripts as "blocked because they are not covered by allowScripts". npm 11.16.x warns that they are "not yet covered" and still runs them, so the note describes it as warning-only and keeps the ENOMATCH caveat about the approve-scripts remedy it suggests. Closes #114665 Co-authored-by: Claude Opus 5 Co-authored-by: Peter Steinberger --- docs/install/index.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/install/index.md b/docs/install/index.md index c3685ca4cff3..b76bc758ea2c 100644 --- a/docs/install/index.md +++ b/docs/install/index.md @@ -80,6 +80,23 @@ If you already manage Node yourself: openclaw onboard --install-daemon ``` + + npm 12 blocks package lifecycle scripts by default, so the command above + skips OpenClaw's `preinstall` and `postinstall` steps — npm reports them + as `blocked because they are not covered by allowScripts`. Allow them + explicitly: + + ```bash + npm install -g openclaw@latest --allow-scripts openclaw + ``` + + npm 11.16.x only warns that the scripts are `not yet covered by + allowScripts` and still runs them. If you want to clear that warning, be + aware that the `npm approve-scripts openclaw` command it suggests does not + work for a global install — it fails with `ENOMATCH No installed packages + match: openclaw`. npm 11.12 and earlier have no such policy. + + The hosted installer clears npm freshness filters such as `min-release-age` for the OpenClaw package install. If you install manually with npm, your own