引用:https://blog.csdn.net/xiaowang_lj/article/details/123211346
Scratch3.0编译
1、准备工作
/* 对版本要求较高,需升级 */
npm install -g npm /* npm升级到最新版本 */
npm install -g n /* nodejs升级 */
n stable /* 升级到最新的稳定版本 */
mkdir scratch /*便于管理,新建一个文件夹存放*/
cd scratch
git clone https://github.com/llk/scratch-gui /*scratch-gui下载*/
git clone https://github.com/llk/scratch-vm /*scratch-vm下载*/
git clone https://github.com/llk/scratch-blocks /*scratch-blocks下载*/
也可以直接从https://github.com/LLK这个地址内下载对应的文件.
2、配置scratch相关模块信息
cd scratch-vm
npm install
npm link
npm run watch
cd ../scratch-blocks
npm install
npm link
cd ../scratch-gui
npm install
npm link scratch-vm scratch-blocks
npm install
npm start
3、输入网址:http://localhost:8601/
4、异常问题:由于node版本升级的比较高,scratch-blocks的时候报了个异常.
处理方法: https://blog.csdn.net/Nikoye/article/details/128372310
环境变量配置好了之后需要更新一下,另外重启终端.