Closed rafaelbatistamarcilio closed 6 years ago
I found the problem.
By default, Heroku not install the devDependencies. How some devDependencies is needed to build the application, its necessarie put then on dependencies section.
My package.json now is like the bellow:
{ "name": "nest-typescript-starter", "version": "1.0.0", "description": "Nest TypeScript starter repository", "license": "MIT", "scripts": { "start": "node index.js", "start:watch": "nodemon", "prestart:prod": "tsc", "start:prod": "node dist/main.js", "postinstall": "npm i ts-node" }, "dependencies": { "@nestjs/common": "^4.5.9", "@nestjs/core": "^4.5.10", "@nestjs/microservices": "^4.5.8", "@nestjs/testing": "^4.5.5", "@nestjs/websockets": "^4.5.8", "redis": "^2.7.1", "reflect-metadata": "^0.1.12", "rxjs": "^5.5.6", "typescript": "^2.6.2", "nodemon": "^1.14.1", "ts-node": "^4.1.0" }, "devDependencies": { "@types/node": "^9.3.0", "nodemon": "^1.14.1", "ts-node": "^4.1.0" }, "engines": { "node": "8.9.4", "npm": "5.6.0" } }
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.
Someone knows how to deploy an nest app on heroku? I folow the heroku instructions , but the app is crashing when i access the URL.
My package.json
{ "name": "nest-typescript-starter", "version": "1.0.0", "description": "Nest TypeScript starter repository", "license": "MIT", "scripts": { "start": "node index.js", "start:watch": "nodemon", "prestart:prod": "tsc", "start:prod": "node dist/main.js" }, "dependencies": { "@nestjs/common": "^4.5.9", "@nestjs/core": "^4.5.10", "@nestjs/microservices": "^4.5.8", "@nestjs/testing": "^4.5.5", "@nestjs/websockets": "^4.5.8", "redis": "^2.7.1", "reflect-metadata": "^0.1.12", "rxjs": "^5.5.6", "typescript": "^2.6.2" }, "devDependencies": { "@types/node": "^9.3.0", "nodemon": "^1.14.1", "ts-node": "^4.1.0" }, "engines": { "node": "8.9.4", "npm": "5.6.0" } }