Windows中的Gatsby安装

麦凯

我正在Windows 10上工作。我试图安装gatsby,但我以为已经安装了,但是当我在VM Code中运行gatsby -v时,出现了问题。

/mnt/c/Users/mmkob/AppData/Roaming/npm/node_modules/gatsby-cli/node_modules/prettier/third-party.js:9863
      for await (const place of this.config.searchPlaces) {
          ^^^^^

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 Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/mnt/c/Users/mmkob/AppData/Roaming/npm/node_modules/gatsby-cli/node_modules/prettier/index.js:16652:18)

我不太确定该怎么办。我将不胜感激。

费兰·布埃鲁

将您的Node版本更新到v10如您在for await...of文档中所见,该语法for await (const place of this.config.searchPlaces)在大于的版本中可用10.0.0

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章