Closed cgx9 closed 6 years ago
code is: app.module.ts
import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { AppController } from './app.controller' @Module({ imports: [ TypeOrmModule.forRoot({ type: 'sqlite', database: 'dev.db', synchronize: true, logging: false, entities: [__dirname + '/**/*.entity{.ts,.js}'], }) ], components: [ ], controllers: [ AppController ] }) export class ApplicationModule{}
entity.ts:
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm'; @Entity() export class Demo { @PrimaryGeneratedColumn() id: number; @Column({length: 100}) title: string; @Column({length: 100}) name: string; }
when i npm start,then throw this: (node:5723) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'join' of undefined
(node:5723) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'join' of undefined
@nestjs/typeorm version is:2.0.0,typeorm version is: ^0.1.21
please close this!
You can close it yourself Just use the "Close Issue" button next to the comment button
code is: app.module.ts
entity.ts:
when i npm start,then throw this:
(node:5723) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'join' of undefined
@nestjs/typeorm version is:2.0.0,typeorm version is: ^0.1.21