Skip to content

[BUG] NPM passes the --ignore-scripts option to all dependencies. #6519

Closed

Description

@frbuceta

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

I install a package of my own that contains sqlite3 which itself contains an install script. When I run npm ci --ignore-scripts in my project, the sqlite3 does not execute the install script.

Expected Behavior

Running npm ci --ignore-scripts should only ignore the scripts in my packages.

Steps To Reproduce

loopbackio/loopback-next#9562 See tests

Environment

  • npm: 9.6.7
  • Node.js: 18.15.0
  • OS Name: GitHub Actions (ubuntu, macos, windows)
  • System Model Name: CI
  • npm config:
; "user" config from /home/fran/.npmrc

//registry.npmjs.org/:_authToken = (protected) 

; "project" config from /home/fran/Projects/loopback-next/.npmrc

package-lock = true 
scripts-prepend-node-path = true 

; node bin location = /usr/bin/node
; node version = v18.15.0
; npm local prefix = /home/fran/Projects/loopback-next
; npm version = 9.6.7
; cwd = /home/fran/Projects/loopback-next
; HOME = /home/fran
; Run `npm config ls -l` to show all defaults.

Activity

  1. added
    Bugthing that needs fixing
    Needs Triageneeds review for next steps
    Release 9.xwork is associated with a specific npm 9 release
    on Jun 2, 2023
  2. ljharb commented on Jun 2, 2023

    @ljharb
    Contributor

    The primary purpose of the flag is to ignore scripts in installed deps imo.

  3. wraithgar commented on Jun 6, 2023

    @wraithgar
    Contributor

    This is not a bug this is by design and as stated is the original purpose behind the flag.

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

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 9.xwork is associated with a specific npm 9 release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions