electron / electron/rebuild

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

Open
#1,180 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.1k
Forks
181
Avg merge
6h 44m
Merged PRs (30d)
3

Description

**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
```
- This dependency will likely need to be updated. https://github.com/electron/rebuild/blob/main/package.json#L48

**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

2. 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

Contributor guide

Open the contributing guide

Research direction

Start by inspecting package.json around the dependency referenced near line 48 and the @electron/node-gyp README. Reproduce npm install with access limited to the npm registry, then resolve whether the dependency or documentation should change. Done means installation succeeds in the restricted environment or the required network constraints and workaround are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, node.js, typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.