Scratch3.0二次开发|补充-2:解决windows上scratch-blocks构建失败
有小伙伴反馈,scratch-blocks 执行 npm install 的时候失败;
解决办法
- 参考 easy-scratch-blocks 的 commit:9d4476a4f47791f09b75816134703029f58127cd)
- 替换两个文件:blockly_compressed_horizontal.js,blockly_compressed_vertical.js
- 修改 “build.py“ 文件
以下是解决办法具体说明
问题说明:在 windows 系统的电脑上,执行 npm install 会报错,错误如下:
Traceback (most recent call last):
File "build.py", line 574, in <module>
test_proc = subprocess.Popen(test_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
File "D:\Python\lib\subprocess.py", line 394, in __init__
errread, errwrite)
File "D:\Python\lib\subprocess.py", line 644, in _execute_child
startupinfo)
WindowsError: [Error 2]
npm ERR! code ELIFECYCLE