Hello Guys, How are you all? Hope You all Are Fine. I am trying to start my nextJs server and I am facing the following error UnhandledPromiseRejectionWarning: Error: You must await server.start() before calling server.applyMiddleware() at ApolloServer In NestJs. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
- How UnhandledPromiseRejectionWarning: Error: You must await server.start() before calling server.applyMiddleware() at ApolloServer Error Occurs ?
- How To Solve UnhandledPromiseRejectionWarning: Error: You must await server.start() before calling server.applyMiddleware() at ApolloServer Error ?
- Solution 1
- Solution 2
- Summery
How UnhandledPromiseRejectionWarning: Error: You must await server.start() before calling server.applyMiddleware() at ApolloServer Error Occurs ?
I am trying to start my nextJs server and I am facing the following error:
UnhandledPromiseRejectionWarning: Error: You must await server.start() before calling server.applyMiddleware() at ApolloServer
How To Solve UnhandledPromiseRejectionWarning: Error: You must await server.start() before calling server.applyMiddleware() at ApolloServer Error ?
- How To Solve UnhandledPromiseRejectionWarning: Error: You must await server.start() before calling server.applyMiddleware() at ApolloServer Error ?
To Solve UnhandledPromiseRejectionWarning: Error: You must await server.start() before calling server.applyMiddleware() at ApolloServer Error just downgrade to apollo-server-express@^2 and your error will be fixed.
Solution 1
This is a known bug with an open issue So that For now, you can downgrade to apollo-server-express@^2
Solution 2
Using “apollo-server-express”: “^3.0.0”, there’s already a fix.
Summery
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also Read