No metadata for “User” was found using TypeOrm

Adding answer bit late but its very common error.

There are two main reasons for above error. In OrmConfig,

  1. You have used *.ts instead of *.js. For example,
entities: [__dirname + '/../**/*.entity.ts']  <-- Wrong

It should be

entities: [__dirname + '/../**/*.entity.js'] 
  1. entities path is wrong. Make sure, entities path is defined according to dist folder not src folder.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)