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
66.9k stars 7.55k forks source link

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): RangeError: Invalid status code: 1 #343

Closed fullstackoverflow closed 6 years ago

fullstackoverflow commented 6 years ago

something wrong when i run the 03-microservices exmaple and visit localhost:3001

untitled

[ ] 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

debug with visual studio code

untitled1

Expected behavior

Minimal reproduction of the problem with instructions

npm i npm start visit localhost:3001

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

Environment


Nest version: 4.3.0


For Tooling issues:
- Node version: v8.9.3  
- Platform:  Windows 

Others:

kamilmysliwiec commented 6 years ago

Hi @fullstackoverflow, Trying to reproduce it, but I can't. Could you update your packages to the latest version? 4.5.7

fullstackoverflow commented 6 years ago
{
  "name": "nest-typescript-starter",
  "version": "1.0.0",
  "description": "Nest TypeScript starter repository",
  "license": "MIT",
  "scripts": {
    "start": "node index.js",
    "prestart:prod": "tsc",
    "start:prod": "node dist/main.js"
  },
  "dependencies": {
    "@nestjs/common": "^4.5.0",
    "@nestjs/core": "^4.5.0",
    "@nestjs/microservices": "^4.5.0",
    "@nestjs/testing": "^4.5.0",
    "@nestjs/websockets": "^4.5.0",
    "amqplib": "^0.5.1",
    "class-transformer": "^0.1.7",
    "class-validator": "^0.7.2",
    "redis": "^2.7.1",
    "reflect-metadata": "^0.1.10",
    "rxjs": "^5.4.3",
    "typescript": "^2.4.2"
  },
  "devDependencies": {
    "@types/amqplib": "^0.5.4",
    "@types/node": "^7.0.41",
    "ts-node": "^3.3.0"
  }
}

It didn't work, i failed on another computer too.

kamilmysliwiec commented 6 years ago

Please, update your packages into 4.5.10. Fixed 🙂

lock[bot] commented 4 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.