简体   繁体   中英

'ENOTDIR' error while running relay-compiler with yarn

I am trying to make an application with react-relay following the step-by-step guide on the relay documentation. After running yarn install and adding the yarn relay script which runs "relay-compiler --src ./src --schema ./schema.graphql --language typescript" . And I was getting an ENOTDIR error as below:

    $ 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.

I have then updated my versions of node, npm, yarn. And tried cloning some relay example projects from github, and I was getting the same error message with all repos that uses relay.

原来是因为我没有所需的 watchman 包,这是通过在我的机器上安装 Watchman 解决的。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM