Skip to content

[BUG] npm install hangs in offline mode due to trying to run audit #4368

Closed
@mohd-akram

Description

@mohd-akram

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 have offline=true set in /etc/npmrc so that all npm invocations are offline. However, doing an npm install of a local directory with all dependencies included hangs due to npm seemingly trying to audit dependencies which presumably requires an internet connection (running with --ddd shows npm sill audit bulk request failed undefined).

Expected Behavior

npm offline mode should be truly offline and npm should not try to audit dependencies if it requires a network connection.

Steps To Reproduce

  1. npm config set offline true
  2. npm install -g package/

Environment

  • npm: 8.1.2
  • Node.js: v16.13.1
  • OS Name: RHEL 8
  • System Model Name: HP Laptop
  • npm config:
offline = true 
prefix = "/usr/local" 
python = "/usr/bin/python3" 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingPriority 2secondary priority issueRelease 8.xwork is associated with a specific npm 8 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions