[英]'ENOTDIR' error while running relay-compiler with yarn
我正在嘗試按照中繼文檔的分步指南使用 react-relay 制作應用程序。 在運行yarn install
並添加運行"relay-compiler --src ./src --schema ./schema.graphql --language typescript"
的yarn relay
腳本之后。 我收到了一個ENOTDIR
錯誤,如下所示:
$ relay-compiler --src ./src --schema ./schema.graphql --language typescript
Error: spawn ENOTDIR
at ChildProcess.spawn (node:internal/child_process:412:11)
at Object.spawn (node:child_process:698:9)
at /home/Documents/workspace/react-relay/node_modules/relay-compiler/bin/relay-compiler:1841:31
at new Promise (<anonymous>)
at Function.isAvailable (/home/Documents/workspace/react-relay/node_modules/relay-compiler/bin/relay-compiler:1835:12)
at /home/Documents/workspace/relay-test/node_modules/relay-compiler/bin/relay-compiler:8221:61
at Generator.next (<anonymous>)
at asyncGeneratorStep (/home/Documents/workspace/react-relay/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (/home/Documents/workspace/react-relay/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
at /home/Documents/workspace/react-relay/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
然后我更新了我的 node、npm、yarn 版本。 並嘗試從 github 克隆一些中繼示例項目,我在所有使用中繼的存儲庫中都收到相同的錯誤消息。
原來是因為我沒有所需的 watchman 包,這是通過在我的機器上安裝 Watchman 解決的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.