The server is listening on 3000. My MySQL database is initialized.
RepositoryNotFoundError: No repository for "User" was found.
Looks like this entity is not registered in current "default" connection?
message: 'No repository for "User" was found. Looks like tes.js)
{his entity is not registered in current "default" connection?'
his entity is not registered in current "default" connection?'}
How can I fix this?
I encountered same problem, You might be trying to use method
getRepositorybefore database connection is established.I solved this problem by using inside async function
const connection = await createConnection()thenawait connection.driver.afterConnect().then()and then stuff like routes.