Relay multi-project configuration doesn't work
Open
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/crimson-frog-go8s7s
To Reproduce
Provide a Relay configuration that makes use of the multi-project format:
module.exports = {
root: ".",
// For simplicity I'm defining just one project but it doesn't make any difference
sources: {
".": "repro",
},
excludes: ["**/node_modules/**", "**/__mocks__/**", "**/__generated__/**"],
projects: {
"repro": {
output: "__generated__",
language: "typescript",
schema: "schema.graphql",
},
},
};
Start the app (both dev mode or build) and observe the Relay integration doesn't work.
Current vs. Expected behavior
⚠ Invalid next.config.mjs options detected:
⚠ "compiler.relay.src" is missing, expected string
⚠ See more info here: https://nextjs.org/docs/messages/invalid-next-config
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023
Available memory (MB): 4102
Available CPU cores: 2
Binaries:
Node: 20.9.0
npm: 9.8.1
Yarn: 1.22.19
pnpm: 8.10.2
Relevant Packages:
next: 15.0.4-canary.23 // Latest available version is detected (15.0.4-canary.23).
eslint-config-next: N/A
react: 19.0.0-rc-380f5d67-20241113
react-dom: 19.0.0-rc-380f5d67-20241113
typescript: 5.3.3
Next.js Config:
output: N/A
Done in 3.69s.
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local)
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox and the provided multi-project Relay configuration, then reproduce the behavior in both next dev and next build. Trace how this configuration is read and why next.config.mjs reports compiler.relay.src as missing. Done means the multi-project configuration works in both stages without that warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, next.js, typescript
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100