question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

include\node\common.gypi not found

See original GitHub issue

Node version: 10.15.3 Electron version: 8.5.0 node-gyp version: 7.1.0 node-abi: 2.19.0 electron-rebuild: 2.0.0 node-keytar: 6.0.1 Platform: Windows x64

Hi 👋,

During the node-keytar rebuild step I’m getting an error:

$ electron-rebuild -f -w keytar
- Searching dependency tree
– Rebuild Failed
An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.0
gyp info using node@10.15.3 | win32 | x64
gyp info find Python using Python version 3.7.3 found at "C:\Python37-32\python3.exe"
gyp info find VS using VS2017 (15.9.28307.1216) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python37-32\python3.exe
gyp info spawn args [ 'C:\\folder\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\folder\\node_modules\\keytar\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\folder\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Windows\\system32\\config\\systemprofile\\.electron-gyp\\4.0.2\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Windows\\system32\\config\\systemprofile\\.electron-gyp\\4.0.2',
gyp info spawn args   '-Dnode_gyp_dir=C:\\folder\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\\\Windows\\\\system32\\\\config\\\\systemprofile\\\\.electron-gyp\\\\4.0.2\\\\<(target_arch)\\\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\folder\\node_modules\\keytar',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\folder\\node_modules\\keytar\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp: C:\Windows\system32\config\systemprofile\.electron-gyp\4.0.2\include\node\common.gypi not found (cwd: C:\folder\node_modules\keytar) 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:\folder\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\folder\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=8.0.0" "--arch=x64" "--dist-url=https://www.electronjs.org/headers" "--build-from-source"
gyp ERR! cwd C:\folder\node_modules\keytar
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v7.1.0
gyp ERR! not ok 

Failed with exit code: 1

Error: gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.0
gyp info using node@10.15.3 | win32 | x64
gyp info find Python using Python version 3.7.3 found at "C:\Python37-32\python3.exe"
gyp info find VS using VS2017 (15.9.28307.1216) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python37-32\python3.exe
gyp info spawn args [ 'C:\\folder\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\folder\\node_modules\\keytar\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\folder\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Windows\\system32\\config\\systemprofile\\.electron-gyp\\4.0.2\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Windows\\system32\\config\\systemprofile\\.electron-gyp\\4.0.2',
gyp info spawn args   '-Dnode_gyp_dir=C:\\folder\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\\\Windows\\\\system32\\\\config\\\\systemprofile\\\\.electron-gyp\\\\4.0.2\\\\<(target_arch)\\\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\folder\\node_modules\\keytar',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\folder\\node_modules\\keytar\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp: C:\Windows\system32\config\systemprofile\.electron-gyp\4.0.2\include\node\common.gypi not found (cwd: C:\folder\node_modules\keytar) 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:\folder\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\folder\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=8.0.0" "--arch=x64" "--dist-url=https://www.electronjs.org/headers" "--build-from-source"
gyp ERR! cwd C:\folder\node_modules\keytar
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v7.1.0
gyp ERR! not ok 

Failed with exit code: 1
    at SafeSubscriber._error (C:\folder\node_modules\spawn-rx\lib\src\index.js:267:84)
    at SafeSubscriber.__tryOrUnsub (C:\folder\node_modules\spawn-rx\node_modules\rxjs\internal\Subscriber.js:205:16)
    at SafeSubscriber.error (C:\folder\node_modules\spawn-rx\node_modules\rxjs\internal\Subscriber.js:156:26)
    at Subscriber._error (C:\folder\node_modules\spawn-rx\node_modules\rxjs\internal\Subscriber.js:92:26)
    at Subscriber.error (C:\folder\node_modules\spawn-rx\node_modules\rxjs\internal\Subscriber.js:72:18)
    at MapSubscriber.Subscriber._error (C:\folder\node_modules\spawn-rx\node_modules\rxjs\internal\Subscriber.js:92:26)
    at MapSubscriber.Subscriber.error (C:\folder\node_modules\spawn-rx\node_modules\rxjs\internal\Subscriber.js:72:18)
    at SafeSubscriber._next (C:\folder\node_modules\spawn-rx\lib\src\index.js:242:65)
    at SafeSubscriber.__tryOrUnsub (C:\folder\node_modules\spawn-rx\node_modules\rxjs\internal\Subscriber.js:205:16)
    at SafeSubscriber.next (C:\folder\node_modules\spawn-rx\node_modules\rxjs\internal\Subscriber.js:143:22)

I can’t reproduce the problem with Electron 7.3.2

Do you have any idea or knowledge about how to solve the problem ? Thanks in advance for your help

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
maleptcommented, Aug 25, 2020

Please try again with 2.0.1, the error should be more obvious.

0reactions
dpilarskcommented, Sep 11, 2020

Issues fixed with 2.0.3 electron-rebuild version

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues - GitHub
node-gyp fails: /root/.node-gyp/5.0.0/common.gypi not found #819 ... -name common.gypi /root/.node-gyp/5.0.0/include/node/common.gypi ...
Read more >
common.gypi not found error in node.js - Stack Overflow
I am trying to "node-gyp configure" to try to get the ms sql server driver. However, initially it said binding.gypi was missing or...
Read more >
Common.gypi not found on Windows 8.1 - Bountysource
Need help to get npm install working. I'm currently getting the following error: [15:11:33][npm install] gyp: ...
Read more >
Fix broken 'node-gyp' issue for Mac OS | by Fernando De Freitas
This issue is usually caused because a node-gyp config file called common.gypi is not set up for your current Mac OS version. It...
Read more >
Problems installing Node and NPM via Homebrew
When I ran brew link --overwrite node I got: Linking /usr/local/Cellar/node/13.8.0... Error: Could not symlink include/node/common.gypi /usr/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found