1

I'm using raspberry pi3 B and am new to the linux system (raspbian). I was trying to build VS Code into raspberry pi3 according to: https://www.hanselman.com/blog/BuildingVisualStudioCodeOnARaspberryPi3.aspx I've done everything accordingly... But when I run the command in the command terminal pi@raspberrypi:

pi@raspberrypi:~/vscode $ ./scripts/npm.sh install --arch=armhf
yarn install v1.3.2
$ node build/npm/preinstall.js
[1/4] Resolving packages...
[2/4] Fetching packages...
info vscode-fsevents@0.3.8: The platform "linux" is incompatible with this module.
info "vscode-fsevents@0.3.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info windows-foreground-love@0.1.0: The platform "linux" is incompatible with this module.
info "windows-foreground-love@0.1.0" is an optional dependency and failed compatibility check. Excluding it from installation.
info windows-mutex@0.2.0: The platform "linux" is incompatible with this module.
info "windows-mutex@0.2.0" is an optional dependency and failed compatibility check. Excluding it from installation.
info windows-process-tree@0.1.6: The platform "linux" is incompatible with this module.
info "windows-process-tree@0.1.6" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/13] ⠄ gc-signals:  #ifndef INCLUDE_V8_H_
[6/13] ⠄ native-watchdog: http 200 https://atom.io/download/electron/v1
[3/13] ⠄ keytar: gyp http GET https://atom.io/download/electron/v1.7.9/
[4/13] ⠄ native-is-elevated: CXX(target) Release/obj.target/is-elevated
error /home/pi/vscode/node_modules/native-keymap: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: /home/pi/vscode/node_modules/native-keymap
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.9.4 | linux | arm
gyp http GET https://atom.io/download/electron/v1.7.9/iojs-v1.7.9.tar.gz
gyp http 200 https://atom.io/download/electron/v1.7.9/iojs-v1.7.9.tar.gz
gyp http GET https://atom.io/download/electron/v1.7.9/SHASUMS256.txt
gyp http 200 https://atom.io/download/electron/v1.7.9/SHASUMS256.txt
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/home/pi/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/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/pi/vscode/node_modules/native-keymap/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/pi/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/pi/.node-gyp/iojs-1.7.9/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/pi/.node-gyp/iojs-1.7.9',
gyp info spawn args   '-Dnode_gyp_dir=/home/pi/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/pi/.node-gyp/iojs-1.7.9/<(target_arch)/iojs.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/pi/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 (/home/pi/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336: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.9.59-v7+
gyp ERR! command "/home/pi/.nvm/versions/node/v8.9.4/bin/node" "/home/pi/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_module
 s/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/vscode/node_modules/native-keymap
gyp ERR! node -v v8.9.4

I have solved the errors as shown below: In particular:

error /home/pi/vscode/node_modules/native-keymap: Command failed.

and:

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 (/home/pi/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336: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.9.59-v7+
gyp ERR! command "/home/pi/.nvm/versions/node/v8.9.4/bin/node" "/home/pi/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_module
 s/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/vscode/node_modules/native-keymap
gyp ERR! node -v v8.9.4

Seem to work after I download libsecret and xkbfile file; but now it show these warnings in EVERY package that it tried to download upon rerunning:

pi@raspberrypi:~/vscode $ ./scripts/npm.sh install --arch=armhf 

warning package.json: No license field
warning code-oss-dev-smoke-test@0.1.0: No license field

Can this warning be ignored? And what should I do to rectify the warning?

Furthermore, I have

yarn install v1.3.2
warning ../../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 45.82s.
Done in 885.46s.

Is it necessary to include fsevents@1.1.3?

  • 1
    This may be easier code.headmelted.com – Steve Robillard Jan 14 '18 at 4:27
  • @SteveRobillard Ohh, ok, sure! Since I'm halfway through this method, I'll try to get it to work, but will surely explore other methods too! Thank you :) – GoodCodes Jan 14 '18 at 10:39
1

The warnings below:

warning package.json: No license field
warning code-oss-dev-smoke-test@0.1.0: No license field

are of no concern whatsoever. It just means that the author of the package didn't include a code license, so npm warns about this. It doesn't affect the running of the code in any way. You don't need to fix it, and it can safely be ignored.

You don't need fsevents either, as it's an optional dependency for macOS only. It doesn't do anything on Linux, so the fact that it didn't install isn't a problem.

Generally, with npm and Yarn, you should only worry if you see 'error' in the output. Both package managers are excessively verbose and spit out a lot of information that doesn't really matter too much if you're just installing a program like VS Code.

  • I see! Thanks so much for your help again! @Aurora0001 ; I hope the VScode works now; it's still unpacking the electron-v1.7.9-linux-arm.zip folder for quite a while now; and return with an unhandled 'error' event with Error: read ECONNRESET I think I would have to post them in another post since I dont think I can pose them here? :/ I had tried researching on how to solve the issue too, but most of the answers online direct me to connection that were manually written for an application; unlike what's happening here – GoodCodes Jan 14 '18 at 14:11
  • Yeah, post that as a new question, @GoodCodes, with the full error, and leave a comment here when it's ready and I'll see if I can help. – Aurora0001 Jan 14 '18 at 14:18
  • Sure, thanks so much! @Aurora0001 Have just posted! Sorry for the delay as I got to reboot my raspi as it froze for quite a long while suddenly when the command is running : raspberrypi.stackexchange.com/questions/77742/… – GoodCodes Jan 14 '18 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.