我使用命令 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)
Node.js v18.7.0
我使用的是 Windows 11
最佳答案
这已在 gatsbyjs/gatsby
issue 35426 中报道过去年 4 月(2022 年),目前还没有最终的解决方案。
首先在本地尝试create-gatsby
,following its readme ,检查这是否是版本问题(尽管 node minimum version was set to 10 )。
如果可能,请在 Linux WSL2(例如 Ubuntu)VM 中尝试一下,以检查这是否与操作系统有关。
关于windows - gatsby新命令错误 "TypeError: rd.cursorTo is not a function",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73354282/