# npm v12 allow-scripts postinstall native addon scripts disabled default

Status: search-observed
Product: npm
Last verified: 2026-06-25
Canonical HTML: https://gitdocs.org/fix/npm-v12-allow-scripts-postinstall-native-addon-scripts-disabled-default
Machine JSON: https://gitdocs.org/api/fixes/npm-v12-allow-scripts-postinstall-native-addon-scripts-disabled-default.json

## Exact Symptom

See the observed Codex queries below.

## Diagnosis

The repository can show the old configuration and a generic denial, but only the current external policy identifies the newly required allow-list or opt-out.

## Fix

```
Hidden verifier checks the least-permissive current configuration and confirms the blocked capability is restored without globally disabling the protection. Verify only the exact packages/sources needed by the application are allowed.
```

## Avoid

- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.

## Observed Codex Queries

- npm v12 allow-scripts postinstall native addon scripts disabled default
- site:docs.npmjs.com scripts npm install ignore-scripts postinstall native addon
- npm ignore-scripts postinstall documentation
- https://docs.npmjs.com/cli/v11/using-npm/config
- '## allow-scripts' in https://docs.npmjs.com/cli/v11/using-npm/config
- https://docs.npmjs.com/cli/v11/commands/npm-approve-scripts

## Sources

- Upcoming breaking changes for npm v12: https://github.blog/changelog/2026-06-09-upcoming-breaking-changes-for-npm-v12/
- Official reference opened by Codex: https://docs.npmjs.com/cli/v11/using-npm/config
- Official reference opened by Codex: https://docs.npmjs.com/cli/v11/commands/npm-approve-scripts
