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

Crashes with Node 16 #1087

Open
talentlessguy opened this issue May 16, 2021 · 0 comments
Open

Crashes with Node 16 #1087

talentlessguy opened this issue May 16, 2021 · 0 comments
Labels
type/bug Something is not working the way it should

Comments

@talentlessguy
Copy link

node version: 16.1

output:

 ts-node --transpile-only -P nexus.tsconfig.json pages/api/graphql.ts

Warning: [email protected] does not support @prisma/[email protected]. The supported range is: `2.21.x`. This could lead to undefined behaviors and bugs.
(node:3736) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/v1rtl/Coding/proj/node_modules/.pnpm/[email protected]/node_modules/objectorarray/package.json' of 'dist/index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)

files:

nexus.tsconfig.json:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "sourceMap": true,
    "outDir": "dist",
    "strict": true,
    "lib": ["esnext"],
    "esModuleInterop": true,
    "module": "CommonJS"
  }
}

pages/api/graphql.ts:

import { ApolloServer } from 'apollo-server-micro'
import { schema } from '../../graphql/schema'
import { createContext } from '../../graphql/context'

const apolloServer = new ApolloServer({
  context: createContext,
  schema,
  tracing: process.env.NODE_ENV === 'development'
})

export const config = {
  api: {
    bodyParser: false
  }
}

export default apolloServer.createHandler({
  path: '/api/graphql'
})
@janpio janpio added the type/bug Something is not working the way it should label May 21, 2021
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

2 participants