electron / electron/rebuild

Fails to build package on Windows

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

Description

I'm trying to build [keytar](https://github.com/atom/node-keytar) inside my Electron project in combination with Electron-packager, and I've configured my packaging script as described in the readme:

```
var baseOptions = {
name: 'Min',
dir: basedir,
out: 'dist/app',
electronVersion: electronVersion,
appVersion: version,
arch: 'all',
ignore: ignoredDirs,
prune: true,
overwrite: true,
afterCopy: [(buildPath, electronVersion, platform, arch, callback) => {
rebuild({ buildPath, electronVersion, arch })
.then(() => callback())
.catch((error) => callback(error))
}]
}
```

If I run this on macOS, it works, but on Windows (10 2004), I get the following error:
```
gyp: C:\Users\User\AppData\Local\Temp\electron-packager\win32-ia32\Min-win32-ia32\resources\app\node_modules\keytar\10.0.0\common.gypi not found (cwd: C:\Users\User\AppData\Local\Temp\electron-packager\win32-ia32\Min-win32-ia32\resources\app\node_modules\keytar) while reading includes of binding.gyp while trying to load binding.gyp
```

If I run `npm rebuild` directly in the repository, however, everything finishes successfully, so I'm assuming the actual node-gyp environment is set up correctly.

Is there anything else I can try to make rebuild work successfully?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.