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

nexus:dev reflection failed #1381

Open
brielov opened this issue Aug 25, 2020 · 8 comments
Open

nexus:dev reflection failed #1381

brielov opened this issue Aug 25, 2020 · 8 comments
Labels
type/bug Something is not working the way it should

Comments

@brielov
Copy link

brielov commented Aug 25, 2020

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)
@brielov brielov added the type/bug Something is not working the way it should label Aug 25, 2020
@yovanoc
Copy link

yovanoc commented Sep 4, 2020

I've the same error and investigate deeper.
There is a link with graphql.

[email protected]

image

but with graphql@14 we have this initial exit code 1 error

@Albert-Gao
Copy link
Contributor

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.

@yovanoc
Copy link

yovanoc commented Sep 7, 2020

There is not more infos than my previous screen

@williamluke4
Copy link
Contributor

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.

@yovanoc
Copy link

yovanoc commented Sep 7, 2020

image

What should I do? There is no graphql in my direct dependencies

@seed-of-apricot
Copy link

image

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.

@cyrus-za
Copy link

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] 

@cyrus-za
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is not working the way it should
Projects
None yet
Development

No branches or pull requests

6 participants