electron / electron/rebuild

Could not find any Visual Studio installation to use

Open
#1,032 11 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 details

- OS: windows
- OS version: 11
- node-pty version: 0.10.1
- electron: 20.1.4
- xterm: 4.2.0
- electron-rebuild: 3.2.9

## Issue description

Tried building from the example (node-pty/examples/electron). It worked!
However, when upgrading electron and other libs would wouldn't work.

**./npm-install.sh**

```
# Electron's version.
export npm_config_target=20.1.4
# The architecture of Electron, can be ia32 or x64.
export npm_config_arch=x64
export npm_config_target_arch=x64
# Download headers for Electron.
export npm_config_disturl=https://www.electronjs.org/headers
# Tell node-pre-gyp that we are building for Electron.
export npm_config_runtime=electron
# Tell node-pre-gyp to build module from source code.
export npm_config_build_from_source=true
# Install all dependencies, and store cache to ~/.electron-gyp.
HOME=~/.electron-gyp npm install
```

**package.json**

```
{
...
"scripts": {
"start": "electron . --ignore-gpu-blacklist",
"rebuild": "electron-rebuild node-pty"
},
...
"dependencies": {
"electron": "^20.1.4",
"node-pty": "^0.10.1",
"xterm": "4.2.0"
},
"devDependencies": {
"electron-rebuild": "^3.2.9"
}
}
```

When rebuilding: `npm rebuild` will get this error

![image](https://user-images.githubusercontent.com/5573444/190398922-53500875-c8d3-44cf-9c8c-5d4f1489c686.png)

Will appreciate your help.

Thank you

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure from node-pty/examples/electron using the reported Windows 11, Electron 20.1.4, and node-pty 0.10.1 setup. Compare npm-install.sh, package.json, npm rebuild, and electron-rebuild node-pty to determine why Visual Studio is not found; done means the native module rebuild succeeds or the required environment issue is clearly documented.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.