【问题标题】:gatsby new command error "TypeError: rd.cursorTo is not a function"gatsby 新命令错误 \"TypeError: rd.cursorTo is not a function\"
【发布时间】:2022-12-13 13:15:12
【问题描述】:

我正在使用命令 gatsby new 创建一个新站点,但出现以下错误

Cloning site template C:\Users\catal\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
        throw ex;
        ^

TypeError: rd.cursorTo is not a function
    at Timeout._onTimeout (C:\Users\catal\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\create-gatsby\lib\index.js:5:852)
    at listOnTimeout (node:internal/timers:564:17)
    at processTimers (node:internal/timers:507:7)

节点.js v18.7.0

我正在使用 Windows 11

【问题讨论】:

    标签: windows gatsby


    【解决方案1】:

    这是去年 4 月(2022 年)gatsbyjs/gatsby issue 35426 报道的,目前还没有最终的解决方案。

    首先在本地尝试create-gatsbyfollowing its readme,检查这是否是版本问题(尽管node minimum version was set to 10)。

    如果可能,也在 Linux WSL2(例如 Ubuntu)VM 中尝试它,以检查这是否与操作系统相关。

    【讨论】:

    • 我很确定它与操作系统有关。谢谢,我不知道 WSL for windows,我会调查一下。
    【解决方案2】:

    将我的 python 版本升级到最新版本为我解决了这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-13
      • 2021-06-21
      • 1970-01-01
      • 2015-11-01
      • 2021-08-20
      • 2019-07-20
      • 2021-08-01
      • 2018-10-28
      相关资源
      最近更新 更多