从5.01升级到5.3.6后,Nestjs失败

时间:2018-09-10 17:16:46

标签: nestjs

  

我正在将Nest js 5.01升级到5.3.6。

我收到以下错误消息,我该如何尝试拥有更多日志记录选项?

**Before upgrade**
[INFO] AppDispatcher - Swagger is exposed at localhost:3001/swagger
[INFO] AppGateway - WebSocket listening!
[INFO] Nest - AccessControlController {/access-control}:
[INFO] Nest - Mapped {/own, GET} route
[INFO] Nest - Mapped {/any, GET} route

**After upgrade**
[INFO] AppDispatcher - Swagger is exposed at localhost:3001/swagger
[ERROR] Index - Cannot read property 'create' of null

这是我的index.ts文件

require("dotenv-safe").load();
import { AppLogger } from "./app/app.logger";
import { AppDispatcher } from "./app/app.dispatcher";

const logger = new AppLogger("Index");

logger.log(`Start`);

const dispatcher = new AppDispatcher();
dispatcher
    .dispatch()
    .then(() => logger.log("Everything up"))
    .catch(e => logger.error(e.message, e.trace));

process.on("SIGINT", async () => {
    await dispatcher.shutdown();
    logger.log("Graceful shutdown the server");
    process.exit();
});

我从

获得了代码示例
  

Nest.js TypeScript的身份验证和授权示例   框架

git@github.com:neoteric-eu/nestjs-auth.git

0 个答案:

没有答案