基于Scratch 3.0 本地客户端源码 部署流程

  1. 下载源码:https://github.com/LLK/scratch-www
  2. 进入目录:cd scratch-www
  3. 安装npm:sudo apt install npm
  4. 更新依赖包:npm install
  • 报错:node-sass@4.6.1 install:`node scripts/install.js` 
  • 原因:node没安装
  • 安装nodejs:sudo apt install nodejs-legacy
  • 重新执行:npm installBuild:npm run build

   5.报错:Block-scoped declarations (let..) not yet supported outside strict mode

        原因:node不是最新的
        升级nodejs到最新:
        安装工具n:sudo npm install n -g
        安装lts版本:sudo n lts
        重启终端
        重新执行:npm run build
        报错:Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime(64)
        原因:系统不支持
        https://github.com/sass/node-sass/releases/tag/v4.6.1(sass支持的node版本)
        发现是node sass和node不兼容,当前版本是4.6.1支持最高的node是9,上一步升级的node到了10.13.0
        降级nodejs到9:sudo n 9.11.2(因为代码中显示依赖sass4.6.1,因此尝试安装node9的最高版本9.11.2)
        重启终端
        重新执行:npm run build
        报错:Node Sass could not find a binding for you current environment: Linux 64-bit with Node.js 9.x
        Found bindings for the following environments:
        Linux 64-bit with Node.js 4.x
        原因:node更新后没有修改sass中的绑定
        重新编译sass:npm rebuild node-sass --force
        重新执行:npm run build
    6.Run:启动
         make translations
         npm start
   7.当上面运行得到:Server listening on port 8333,表示启动成功


查看结果:查看本地scratch内容

  • 本机访问http://localhost:8333

 

  • 局域网访问http://192.168.3.155:8333(服务器IP地址)

--------------------- 
作者:suoxd123 
来源:CSDN 
原文:https://blog.csdn.net/suoxd123/article/details/84563583 
版权声明:本文为博主原创文章,转载请附上博文链接!

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值