nestjs / nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript šŸš€
https://nestjs.com
MIT License
67.69k stars 7.63k forks source link

Cannot run apollo example #1067

Closed renhuailin closed 6 years ago

renhuailin commented 6 years ago

I'm submitting a...


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

can not run apollo example .

Expected behavior

apollo example runs without any error.

Minimal reproduction of the problem with instructions

Download master branch as zip file ,extract it , cd to 12-graphql-apollo directory, run npm install && npm start

What is the motivation / use case for changing the behavior?

Environment


Nest version:5.4.0


For Tooling issues:
- Node version: v10.2.1  
- Platform:  Mac 

Others:


Error message:

npm start

> nest-typescript-starter@1.0.0 start /Users/harley/Downloads/nest-master/sample/12-graphql-apollo
> ts-node src/main

[Nest] 38312   - 9/9/2018, 10:32:48 PM   [NestFactory] Starting Nest application...
[Nest] 38312   - 9/9/2018, 10:32:48 PM   [ExceptionHandler] Nest can't resolve dependencies of the GraphQLModule (?, GqlModuleOptions, GraphQLFactory, GraphQLTypesLoader). Please make sure that the argument at index [0] is available in the current context. +17ms
Error: Nest can't resolve dependencies of the GraphQLModule (?, GqlModuleOptions, GraphQLFactory, GraphQLTypesLoader). Please make sure that the argument at index [0] is available in the current context.
    at Injector.resolveSingleParam (/Users/harley/Downloads/nest-master/sample/12-graphql-apollo/node_modules/@nestjs/core/injector/injector.js:115:19)
    at Promise.all.dependencies.map (/Users/harley/Downloads/nest-master/sample/12-graphql-apollo/node_modules/@nestjs/core/injector/injector.js:85:49)
    at Array.map ()
    at Injector.resolveConstructorParams (/Users/harley/Downloads/nest-master/sample/12-graphql-apollo/node_modules/@nestjs/core/injector/injector.js:83:58)
    at Injector.loadInstance (/Users/harley/Downloads/nest-master/sample/12-graphql-apollo/node_modules/@nestjs/core/injector/injector.js:63:20)
    at Injector.loadInstanceOfComponent (/Users/harley/Downloads/nest-master/sample/12-graphql-apollo/node_modules/@nestjs/core/injector/injector.js:40:20)
    at Promise.all.map (/Users/harley/Downloads/nest-master/sample/12-graphql-apollo/node_modules/@nestjs/core/injector/instance-loader.js:39:102)
    at Array.map ()
    at InstanceLoader.createInstancesOfComponents (/Users/harley/Downloads/nest-master/sample/12-graphql-apollo/node_modules/@nestjs/core/injector/instance-loader.js:39:59)
    at Promise.all.map (/Users/harley/Downloads/nest-master/sample/12-graphql-apollo/node_modules/@nestjs/core/injector/instance-loader.js:26:24)
[Nest] 38312   - 9/9/2018, 10:32:48 PM   [InstanceLoader] ApplicationModule dependencies initialized +0ms
 1: node::Abort() [/usr/local/bin/node]
 2: node::Chdir(v8::FunctionCallbackInfo const&) [/usr/local/bin/node]
 3: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/bin/node]
 4: v8::internal::MaybeHandle v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate*, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::BuiltinArguments) [/usr/local/bin/node]
 5: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
 6: 0x3742ddc0427d

kamilmysliwiec commented 6 years ago

Please, update your @nestjs/core and @nestjs/common to 5.3.6. Just pushed fix

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.