Skip to content

Request: Document allowScripts for npm 12+ compatibility #1127

Description

@nemchik

Contact Email

eric@nemchik.com

Type of Contribution

Documentation Improvement

Product

SuiteCloud CLI

Contribution Description

Ref: #938
(most content below is copied and consolidated from the issue above)

npm 12.x documents under their breaking changes:

ref: https://docs.npmjs.com/cli/v12/using-npm/changelog#1200-2026-07-08

  • Dependency lifecycle scripts are now blocked by default unless allowed by the root package's allowScripts policy. After installing, run npm install-scripts approve to record approvals and npm rebuild to execute newly approved scripts.

The bullet point (about allowScripts) is worth documenting as it would prevent the jar installation part of the postinstall script.


Please consider updating the documentation from:

npm install -g @oracle/suitecloud-cli

to:

npm install -g @oracle/suitecloud-cli --allow-scripts=@oracle/suitecloud-cli

It would also be beneficial to note that @oracle/suitecloud-cli can be installed locally into a project with:

npm install @oracle/suitecloud-cli
npm approve-scripts @oracle/suitecloud-cli
npm rebuild

This is meant for use when there is a local project with a package.json present to record the allowScripts key. Installing the package locally is ideal for projects that prefer to have package versions controlled across multiple developer machines and potential CI/CD, rather than relying on global installs where the version may differ in each of these environments.

A new note on the above comment;
I notice the documentation quoted above mentions running npm install-scripts approve and then npm rebuild. My recommendation above mentions npm approve-scripts which is an alias of npm install-scripts approve. After that, npm rebuild is needed to trigger the scripts (license and jar install). This is only needed for local project installs.

Prerequisites

Yes

Additional Information

https://docs.npmjs.com/cli/v12/commands/npm-approve-scripts
https://docs.npmjs.com/cli/v12/commands/npm-install-scripts
https://docs.npmjs.com/cli/v12/commands/npm-rebuild

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions