【问题标题】:Problem with building the front-end-template构建前端模板的问题
【发布时间】:2021-08-09 01:54:30
【问题描述】:

我正在尝试按照 tutorial 为 Substrate 安装和使用 React 前端模板,但是当我在项目的根目录中运行 yarn installyarn start 时出现此错误:

/home/.../substrate-front-end-template/.yarn/releases/yarn-berry.cjs:2
module.exports=(()=>{var e=

*blah blah blah*

SyntaxError: Unexpected reserved word
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3

我正在使用纱线 v.1.22.11 和节点 v.8.10.0。我该如何解决这个问题?

【问题讨论】:

    标签: substrate


    【解决方案1】:

    检查 Yarn 和 NodeJS 的版本。在我这边的那些版本上一切正常:

    tomek@rhei-box:~/workspaces/substrate-front-end-template$ node -v
    v12.22.4
    tomek@rhei-box:~/workspaces/substrate-front-end-template$ yarn -v
    2.4.0
    

    如果您使用的是类似 Linux 的机器,请检查 nvm 工具,以便能够更改 NodeJS 的快速版本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-10
      • 1970-01-01
      • 2021-11-18
      • 2015-03-01
      • 2017-05-28
      • 1970-01-01
      • 1970-01-01
      • 2013-01-16
      相关资源
      最近更新 更多