facebook / facebook/relay

'relay-compiler' is not recognized as an internal or external command, operable program or batch file.

Open
#4,660 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Using git bash (Windows), running the `relay-compiler` script configured in `package.json` scripts shows the error:
```
$ npm run relay-compiler

> package-name@1.2.3 relay-compiler
> relay-compiler

'relay-compiler' is not recognized as an internal or external command,
operable program or batch file.
```
Things I've tried:

- Restarting terminal
- Used a different terminal
- Running `npm install` again
- Running other scripts (eg `npm run dev` runs successfully)
- Running validate from another script `"relay-validate": "relay-compiler --validate",` also shows this error
- Checked config

relay.config.json:
```json
{
"src": "./src",
"language": "typescript",
"schema": "./src/schema.graphql",
"exclude": ["**/node_modules/**", "**/__mocks__/**", "**/__generated__/**"],
"eagerEsModules": true
}
```

Installed packages in dependencies:
```
"react-relay": "^15.0.0",
"relay-runtime": "^15.0.0",
```

Installed packages in devDependencies:
```
"@types/react-relay": "^14.1.5",
"@types/relay-runtime": "^14.1.13",
"babel-plugin-relay": "^15.0.0",
"relay-compiler": "^15.0.0",
```

I presume the cause is some configuration or environment, but I've never encountered this issue before so maybe it's a bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.