I'm building VS Code from source on Ubuntu 18.04.2 LTS. While running
yarn run watch
as instructed on https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run and got following error.
Error: Cannot find module 'gulp-watch'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/title/workspace/vscode/build/lib/watch/index.js:23:68)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
error Command failed with exit code 1.
So, I tried to install gulp-watch by executing yarn add gulp-watch --no-save
and got following error
error /home/title/workspace/vscode/node_modules/native-keymap: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /home/title/workspace/vscode/node_modules/native-keymap
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/share/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/title/workspace/vscode/node_modules/native-keymap/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/share/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/title/.node-gyp/iojs-3.1.8/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/title/.node-gyp/iojs-3.1.8',
gyp info spawn args '-Dnode_gyp_dir=/usr/share/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/title/.node-gyp/iojs-3.1.8/<(target_arch)/iojs.lib',
gyp info spawn args '-Dmodule_root_dir=/home/title/workspace/vscode/node_modules/native-keymap',
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 'build',
gyp info spawn args '-Goutput_dir=.' ]
Package xkbfile was not found in the pkg-config search path.
Perhaps you should add the directory containing `xkbfile.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xkbfile' found
gyp: Call to 'pkg-config x11 xkbfile --libs' returned exit status 1 while in 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 (/usr/share/node-gyp/lib/configure.js:340:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-47-generic
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/title/workspace/vscode/node_modules/native-keymap
What interested me is No package 'xkbfile' found
message, but didn't find much related to xkbfile.
How do I get pass this?
Thanks
According to https://github.com/Microsoft/node-native-keymap, I have to install node-native-keymap's dependencies by executing
sudo apt-get install -y g++ gcc make python2.7 pkg-config libx11-dev libxkbfile-dev libsecret-1-dev
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With