nestjs / typeorm

TypeORM module for Nest framework (node.js) 🍇
https://nestjs.com
MIT License
1.93k stars 206 forks source link

throw error: TypeError: Cannot read property 'join' of undefined #20

Closed cgx9 closed 6 years ago

cgx9 commented 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

@nestjs/typeorm version is:2.0.0,typeorm version is: ^0.1.21

cgx9 commented 6 years ago

please close this!

BRUNNEL6 commented 6 years ago

You can close it yourself Just use the "Close Issue" button next to the comment button