w3tecch / express-typescript-boilerplate

A delightful way to building a RESTful API with NodeJs & TypeScript by @w3tecch
MIT License
3.29k stars 904 forks source link

yarn start after build #120

Closed kdshop closed 5 years ago

kdshop commented 5 years ago

after build trying to deploy but getting this error anyone got a clue?

yarn run v1.7.0
$ nps
nps is executing `default` : nps start
nps is executing `start` : cross-env NODE_ENV=production node dist/src/app.js
(node:3944) UnhandledPromiseRejectionWarning: EntityMetadataNotFound: No metadata for "User" was found.
    at new EntityMetadataNotFoundError (/home/konrad/Pulpit/dev/express-typescript-boilerplate/node_modules/typeorm/error/EntityMetadataNotFoundError.js:19:28)
    at Connection.getMetadata (/home/konrad/Pulpit/dev/express-typescript-boilerplate/node_modules/typeorm/connection/Connection.js:351:19)
    at EntityManager.getCustomRepository (/home/konrad/Pulpit/dev/express-typescript-boilerplate/node_modules/typeorm/entity-manager/EntityManager.js:622:84)
    at Connection.getCustomRepository (/home/konrad/Pulpit/dev/express-typescript-boilerplate/node_modules/typeorm/connection/Connection.js:380:29)
    at getRepository (/home/konrad/Pulpit/dev/express-typescript-boilerplate/node_modules/typeorm-typedi-extensions/decorators/InjectRepository.js:28:31)
    at Object.value (/home/konrad/Pulpit/dev/express-typescript-boilerplate/node_modules/typeorm-typedi-extensions/decorators/InjectRepository.js:73:41)
    at /home/konrad/Pulpit/dev/express-typescript-boilerplate/node_modules/typedi/ContainerInstance.js:223:37
    at Array.map (<anonymous>)
    at ContainerInstance.initializeParams (/home/konrad/Pulpit/dev/express-typescript-boilerplate/node_modules/typedi/ContainerInstance.js:220:27)
    at ContainerInstance.getServiceValue (/home/konrad/Pulpit/dev/express-typescript-boilerplate/node_modules/typedi/ContainerInstance.js:182:40)
(node:3944) 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(). (rejection id: 1)
(node:3944) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
kdshop commented 5 years ago

Solved hiere https://github.com/typeorm/typeorm/issues/2882