icebob / kantab

[WIP] Kanban board application. Powered by Moleculer & Vue.JS
GNU General Public License v3.0
138 stars 31 forks source link

UnhandledPromiseRejectionWarning: on http://localhost:4000/graphql access #2

Closed radojko closed 5 years ago

radojko commented 5 years ago

I have following error when I try to access to http://localhost:4000/graphql

mol $ [06:03:15.769Z] INFO V1.API: => GET /graphql [06:03:15.782Z] INFO V1.API: User authenticated via JWT. { username: 'admin', e mail: 'admin@kantab.io', id: '5c1b32351e38bc8604fabd1a' } [06:03:15.783Z] INFO V1.API: Call custom function in ' * /graphql/ => <F unction>' alias [06:03:15.785Z] INFO V1.API: ? Recreate Apollo GraphQL server and regenerate Gr aphQL schema... [06:03:15.831Z] INFO V1.API: Generated GraphQL schema:

type Board { id: String! title: String! slug: String description: String owner: User createdAt: Float }

scalar Date

type LoginToken { token: String! }

type Mutation { login(email: String!, password: String, token: String): LoginToken createBoard(title: String!, description: String): Board }

type Query { users(limit: Int, offset: Int, sort: String): [User] user(id: String): User me: User boards(limit: Int, offset: Int, sort: String): [Board] boardsCount: Int board(id: String!): Board }

type User { id: String! username: String! firstName: String! lastName: String! email: String avatar: String status: Int boards(limit: Int, offset: Int, sort: String): [Board] boardCount: Int }

(node:18628) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ' meta' of undefined at Service.sendResponse (h:\Projekti\Tutoriali\Moleculer\kantab\node_modules \moleculer-web\src\index.js:566:12) at send (h:\Projekti\Tutoriali\Moleculer\kantab\node_modules\moleculer-apoll o-server\src\ApolloServer.js:17:10) at Service.graphqlHandler (h:\Projekti\Tutoriali\Moleculer\kantab\node_modul es\moleculer-apollo-server\src\ApolloServer.js:59:13) at at process._tickCallback (internal/process/next_tick.js:188:7) (node:18628) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejectio n id: 3) (node:18628) [DEP0018] DeprecationWarning: Unhandled promise rejections are depr ecated. In the future, promise rejections that are not handled will terminate th e Node.js process with a non-zero exit code. [06:03:17.604Z] INFO V1.API: => GET /graphql [06:03:17.611Z] INFO V1.API: User authenticated via JWT. { username: 'admin', e mail: 'admin@kantab.io', id: '5c1b32351e38bc8604fabd1a' } [06:03:17.613Z] INFO V1.API: Call custom function in ' * /graphql/ => <F unction>' alias (node:18628) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ' meta' of undefined at Service.sendResponse (h:\Projekti\Tutoriali\Moleculer\kantab\node_modules \moleculer-web\src\index.js:566:12) at send (h:\Projekti\Tutoriali\Moleculer\kantab\node_modules\moleculer-apoll o-server\src\ApolloServer.js:17:10) at Service.graphqlHandler (h:\Projekti\Tutoriali\Moleculer\kantab\node_modul es\moleculer-apollo-server\src\ApolloServer.js:59:13) at at process._tickCallback (internal/process/next_tick.js:188:7) (node:18628) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejectio n id: 4)

icebob commented 5 years ago

Yes, thanks. moleculer-apollo-server is not ready for moleculer-web@0.9

icebob commented 5 years ago

Fixed. Remove moleculer-apollo-server from node_modules & npm install again.