我正试图按照接力文档的一步一步的指南使用react继电器来创建一个应用程序。在运行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.然后我更新了我的节点,npm,纱线的版本。然后尝试从github克隆一些中继示例项目,我得到了与所有使用中继的repos相同的错误消息。
发布于 2021-12-19 21:28:36
原来是因为我没有所需的看门人包,这是通过在我的机器上安装守望者来解决的。
https://stackoverflow.com/questions/69021476
复制相似问题