Skip to content

Npm pkg Install fails when network access is restricted to npm repository only (internal/private network setup). #1180

@nambrozoh

Description

@nambrozoh

Environment

  • Network configuration: Restricted to private npm registry (internal clone), no access to github.
  • Npm Packages:
    • "@electron/rebuild": "3.7.1 "
    • "electron": "34.3.2"

Error

npm ERR! Error while executing:
npm ERR! /bin/git ls-remote -h -t https://github.com/electron/node-gyp.git
npm ERR!
npm ERR! fatal: unable to access 'https://github.com/electron/node-gyp.git/': Failed to connect to github.com port 443 after 1047 ms: Couldn't connect to server
npm ERR!
npm ERR! exited with error code: 128

Current Behavior

  • Build process fails when attempting to access external resources in github
  • Unable to complete installation in restricted network environments

Expected Behavior

  • Package should be able to build successfully when network access is limited to the @electron/node-gyp npm repository
  • Dependencies should be properly resolved through npm registry

Proposed Solutions
Either:

  1. Switch to using regular node-gyp instead of @electron/node-gyp
    • Regular node-gyp has better support for restricted network environments
    • Would resolve the network access issues

OR

  1. Update @electron/node-gyp README documentation to:
    • Clearly explain why @electron/node-gyp is required over regular node-gyp
    • Document any specific network requirements
    • Provide workarounds for restricted network environments

Additional Context
This issue affects organizations with strict network policies where external access is limited to npm repository only.

Impact

  • Blocks adoption in enterprise environments
  • Causes deployment issues in secure/restricted networks

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