graphql-framework-experiment
graphql-framework-experiment copied to clipboard
nexus:dev reflection failed
I'm trying to integrate nexus with next.js using the guide and the example repo but when I try to run reflection on a separate terminal window, it throws the following error:
● nexus:dev running reflection
■ nexus:dev reflection failed
| error Error:
| Runner failed with exit code "1".
|
| at ChildProcess.<anonymous> (/Users/brielov/Code/logistics/www/node_modules/nexus/src/lib/reflection/reflect.ts:128:18)
| at ChildProcess.emit (events.js:314:20)
| at ChildProcess.EventEmitter.emit (domain.js:486:12)
| at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
I've the same error and investigate deeper. There is a link with graphql.
but with graphql@14 we have this initial exit code 1 error
It indicates something wrong with the TS building step. You have to go to your IDE and check for the error, I think I read somewhere, where you can have a LOG_LEVEL=trace when nexus dev to make it yield the actual error.
There is not more infos than my previous screen
Hey @yovanoc, Run npm list graphql or yarn list graphql too see if you have different versions of graphql installed. Also if you have graphql defined in your package.json, remove it and rerun npm i nexus.
What should I do? There is no graphql in my direct dependencies

Here's my output. It seems that now nexus bundles apollo-server-express that has [email protected] and conflict with the version of the direct child of nexus.
I've got the same error
Yarn list with args is deprecated so I used yarn why and npm list below
✗ yarn why graphql
yarn why v1.22.4
[1/4] 🤔 Why do we have the module "graphql"...?
[2/4] 🚚 Initialising dependency graph...
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "[email protected]"
info Reasons this module exists
- "nexus" depends on it
- Hoisted from "nexus#graphql"
- Hoisted from "nexus#apollo-server-express#apollo-server-core#@types#graphql-upload#graphql"
info Disk size without dependencies: "3.11MB"
info Disk size with unique dependencies: "3.21MB"
info Disk size with transitive dependencies: "3.21MB"
info Number of shared dependencies: 1
✨ Done in 0.69s.
npm list graphql
[email protected] /Users/pieter/Invisible/yggdrasil/services/vor
└─┬ [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ └─┬ @types/[email protected]
│ └── [email protected] deduped
└── [email protected]
Turns out that adding DEBUG=* in front will show you the underlying error. nexus reflection is hiding these. In my case it was some graphql object types that werent explicitly imported (I need to do this as I am using a workaround to get it running in a serverless funcion on vercel)