首先要安装nodejs
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs
There are some NPM native modules like node-native-keymap that didn’t work when I built the first time, so you’ll need some supporting libraries first:
sudo apt-get install libx11-dev
安装yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - sudo echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt-get update && sudo apt-get install yarn
切换国内源
npm config set registry=https://registry.npm.taobao.org yarn config set registry https://registry.npm.taobao.org 下载cnpm:npm install -g cnpm –registry=https://registry.npm.taobao.org
Then, from my Raspberry Pi, I did this to build my own instance of VS Code.
git clone https://github.com/microsoft/vscode cd vscode ./scripts/npm.sh install --arch=armhf
This took the Raspberry Pi 3 about 20 minutes so be patient.
Then, run your instance with ./scripts/code.sh from that same folder.
最后分享几个相关话题的链接:
1、源包下载地址:
https://packagecloud.io/headmelted/codebuilds
2、国外大佬手动编译教程:
http://www.hanselman.com/blog/BuildingVisualStudioCodeOnARaspberryPi3.aspx