Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relay-compiler does not recognize diagnosticReportConfig in package.json:relay configuration #4130

Open
BigBallard opened this issue Nov 15, 2022 · 1 comment · May be fixed by #4604
Open

Comments

@BigBallard
Copy link

relay-compiler does not recognize diagnosticReportConfig in package.json:relay configuration

Environment

  • relay-compiler v14.1.0

Reproduction Steps

"relay": {
  "diagnosticReportConfig": {
    "criticalLevel": "warning"
  }
}
  • Run npm run relay in terminal
  • Observe the error message:
$ npm run relay

> relay-starter-kit@0.1.0 relay /app
> relay-compiler

[ERROR] Unable to initialize relay compiler configuration. Error details: 
Error searching config: Invalid config file: "/app/package.json": Found key `relay` in package.json, but failed incorrect value: The config file cannot be parsed as a multi-project config file due to:
- Error("unknown field `diagnosticReportConfig`, expected one of `name`, `root`, `header`, `codegenCommand`, `sources`, `excludes`, `projects`, `featureFlags`, `savedStateConfig`, `isDevVariableName`", line: 0, column: 0).

It also cannot be a single project config file due to:
- Error("unknown field `diagnosticReportConfig`, expected one of `schema`, `src`, `artifactDirectory`, `include`, `extensions`, `excludes`, `schemaExtensions`, `noFutureProofEnums`, `language`, `customScalars`, `eagerEsModules`, `persistConfig`, `isDevVariableName`, `codegenCommand`, `jsModuleFormat`, `schemaConfig`, `moduleImportConfig`, `typegenPhase`, `featureFlags`", line: 0, column: 0).
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! relay-starter-kit@0.1.0 relay: `relay-compiler`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the relay-starter-kit@0.1.0 relay script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/npm-cache/10.24.1/_logs/2022-11-15T21_14_33_991Z-debug.log

What I expected

I would expect the compiler to run with errors being displayed as warnings.

What actually happens

It would seem that the compiler is unaware of the documented configuration option and throws an error message with the list of acceptable options it knows of. The official README for the compiler shows this to be a valid option.

@kejistan
Copy link

That config option was added recently, it didn't exist in 14.1.0.

@Xinkai Xinkai linked a pull request Jan 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants