Repository navigation
Closed
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
Issue Details
- Electron Version:
-
- master (f1fb513)
-
- Operating System:
- win7 x64 sp1
I followed the directions for building headers for testing in the testing doc
ninja -C out\Testing-x86 third_party\electron_node:headers
cd out\Testing-x86
mkdir gen\node_headers\Release
copy electron.lib gen\node_headers\Release\node.lib
C:\electron-build\electron-gn\src\electron>npm run test
> [email protected] test C:\electron-build\electron-gn\src\electron
> node ./script/spec-runner.js
Triggering runners: main, remote, native
npx: installed 1 in 1.884s
yarn install v1.15.2
warning package.json: No license field
warning [email protected]: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error C:\electron-build\electron-gn\src\electron\spec\node_modules\is-valid-window: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\electron-build\electron-gn\src\electron\spec\node_modules\is-valid-window
Output:
C:\electron-build\electron-gn\src\electron\spec\node_modules\is-valid-window>if not defined npm_config_node_gyp (node "C:\Users\user1\AppData\Local\Programs\node
\current\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\user1\AppData\Local\Programs\node\npm\no
de_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp: C:\electron-build\electron-gn\src\out\undefined\gen\node_headers\common.gypi not found (cwd: C:\electron-build\electron-gn\src\electron\spec\node_modules\i
s-valid-window) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\user1\AppData\Local\Programs\node\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Users\\user1\\AppData\\Local\\Programs\\node\\current\\node.exe" "C:\\Users\\user1\\AppData\\Local\\Programs\\node\\npm\\node_modules\\npm\\
node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\electron-build\electron-gn\src\electron\spec\node_modules\is-valid-window
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
✗ Failed to yarn install in 'C:\electron-build\electron-gn\src\electron\spec'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `node ./script/spec-runner.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user1\AppData\Roaming\npm-cache\_logs\2020-02-26T19_39_55_132Z-debug.log
The one obvious problem that jumps out is
gyp: C:\electron-build\electron-gn\src\out\undefined\gen\node_headers\common.gypi not found
Is it trying to refer to C:\electron-build\electron-gn\src\out\Testing-x86\gen\node_headers\include\node\common.gypi ?
Metadata
Metadata
Assignees
Labels
No labels
Activity
codebytere commentedon Feb 27, 2020
If you set
process.env.ELECTRON_OUT_DIRtoTesting-x86that'll address it. We default our possible out directories to check for'Testing', 'Release', 'Default'so if it's not one of those and the env var is not set it'll be undefined. That should prolly be more clear in docs though and throw an error, so i'll try to get to that soon.also - you should be using build-tools; it automatically handles this.
bughit commentedon Feb 27, 2020
it gets further after setting
ELECTRON_OUT_DIRbut fails building is-valid-windowbughit commentedon Feb 27, 2020
@codebytere Can you keep this open for the next (unresolved symbols) issue?
Assuming those symbols are supposed to be provided by
copy electron.lib gen\node_headers\Release\node.libthey are indeed missing. For examplenapi_get_booleanis not there but_napi_get_booleanis__imp_napi_is_bufferis not there but_napi_is_bufferisbughit commentedon Feb 27, 2020
created a new one #22432
codebytere commentedon Feb 27, 2020
thanks @bughit, appreciated