当前位置: 首页 > news >正文

npm下的scratch(少儿编程篇)

引言

小孩处于求知欲特别旺盛的时期,是时候开始播撒编程的种子。男孩子就要做那些酷酷的事情。

先上效果图

在这里插入图片描述
在这里插入图片描述

源代码地址

https://github.com/scratchfoundation/scratch-gui.git
https://github.com/scratchfoundation/scratch-desktop.git

环境配置

在这里插入图片描述

启动任务

Ctrl+Shift+P 在这里插入图片描述

显示库安装路径

npm list -g --depth 0
在这里插入图片描述
npm install
npm start

网路错误

npm error code 1 npm error path D:\LinuxWorkSpace\scratch-desktop\node_modules\electron npm error command failed npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js npm error Debugger listening on ws://127.0.0.1:59754/e8d2be43-6dd4-45a3-a456-a95bb191fa4b npm error For help, see: https://nodejs.org/en/docs/inspector npm error Debugger attached. npm error ReadError: The server aborted pending request npm error at IncomingMessage.<anonymous> (D:\LinuxWorkSpace\scratch-desktop\node_modules\got\dist\source\core\index.js:809:31) npm error at Object.onceWrapper (node:events:632:28) npm error at IncomingMessage.emit (node:events:530:35) npm error at origin.emit (D:\LinuxWorkSpace\scratch-desktop\node_modules\@szmarczak\http-timer\dist\source\index.js:43:20) npm error at IncomingMessage._destroy (node:_http_incoming:221:10) npm error at _destroy (node:internal/streams/destroy:122:10) npm error at IncomingMessage.destroy (node:internal/streams/destroy:84:5) npm error at TLSSocket.socketCloseListener (node:_http_client:478:11) npm error at TLSSocket.emit (node:events:530:35) npm error at node:net:346:12 npm error Waiting for the debugger to disconnect... npm error A complete log of this run can be found in: C:\Users\HiMaq\AppData\Local\npm-cache\_logs\2025-08-18T03_21_51_368Z-debug-0.log Waiting for the debugger to disconnect...

# 全局设置 npm 镜像为淘宝源
npm config set registry "https://registry.npmmirror.com/"
# 环境配置
npm config set proxy http://127.0.0.1:7890
npm config set https-proxy http://127.0.0.1:7890
npm config get https-proxy
npm config get proxycurl -x http://127.0.0.1:7890 https://registry.npmmirror.com/npm config listnpm install --proxy http://127.0.0.1:7890 --https-proxy http://127.0.0.1:7890npm cache clean --forcenpm config set registry https://registry.npmmirror.com/# 全局安装进度显示工具
npm install -g npm-install-progress
# 使用该工具执行安装
npm-install-progress install# 手动下载
https://github.abskoop.workers.dev/https://github.com/electron/electron/releases/download/v25.9.8/electron-v25.9.8-win32-x64.zip# 关闭调试模式并启动
node --inspect=false scripts/start.js# 显示安装进度
npm install -g cnpm --registry=https://registry.npmmirror.com# cnpm
cnpm config set progress true# 版本检测
D:\LinuxWorkSpace\scratch-desktop>npx electron --version
v25.9.8
解决国区下载失败错误

在这里插入图片描述

解决编译错误

https://github.com/scratchfoundation/scratch-gui/issues/9012
在这里插入图片描述

打包windows程序

https://blog.csdn.net/weixin_42409913/article/details/103877621

核心指令

# 关闭npm的严格校验(临时解决完整性问题)
npm config set strict-ssl false
npm install
npm run start
npm link scratch-gui
npm run build-gui
npm start
npm run dist
游戏源码

https://www.codewizardshq.com/25-best-scratch-games/

https://blog.csdn.net/weixin_42409913/article/details/103877621⭐⭐⭐⭐⭐

http://www.lryc.cn/news/625783.html

相关文章:

  • 使用segment-anything将目标检测label转换为语义分割label
  • 零售行业新店网络零接触部署场景下,如何选择SDWAN
  • 【Proteus仿真】【51单片机】基于51单片机自动售货机12864屏幕
  • ICCV 2025 | 首个3D动作游戏专用VLA模型,打黑神话只狼超越人类玩家
  • 如何免费给视频加字幕
  • AndroidR车机系统Settings数据库增加非持久化存储键值方案-续
  • 国产!全志T113-i 双核Cortex-A7@1.2GHz 工业开发板—ARM + FPGA通信案例
  • 深入解析Spring MVC运行流程:从请求到响应的完整旅程
  • React学习(六)
  • Spring Cache 整合 Redis 实现高效缓存
  • Android音频学习(十三)——音量配置文件分析
  • proDAD VitaScene:专业视频转场特效滤镜软件
  • spring声明式事务,finally 中return对事务回滚的影响
  • 第12章 React生态工具链
  • 第14章 现代React特性
  • 在VSCode中进行Vue前端开发推荐的插件
  • Web3.0 时代的电商系统:区块链如何解决信任与溯源问题?
  • [Git] 如何拉取 GitHub 仓库的特定子目录
  • 神经网络训练过程详解
  • 20.2 QLoRA微调全局参数实战:高点击率配置模板+显存节省50%技巧
  • (一)八股(数据库/MQ/缓存)
  • 【赎金信】
  • 环境变量不生效?
  • C#三大核心特性
  • 实现自己的AI视频监控系统-第一章-视频拉流与解码1
  • Laya的适配模式选择
  • 代码随想录算法训练营四十六天|图论part04
  • BROADCHIP广芯电子在各类电子产品的方案与应用
  • 企业如何让内部视频仅限指定域名播放,确保视频不被泄露?
  • 2025年8月16日(星期六):雨骑古莲村游记