Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No repository for "User" was found. #10

Closed
michalkow opened this issue Mar 12, 2019 · 4 comments
Closed

No repository for "User" was found. #10

michalkow opened this issue Mar 12, 2019 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@michalkow
Copy link

Describe the bug
On app start, I receive this error.

To Reproduce
Steps to reproduce the behavior:

  1. Follow steps in installation from the source instruction
  2. Run app

Expected behavior
App will run

** Environment (please complete the following information):**

  • Device: Desktop
  • OS: MacOS 10.13.6

Additional context
[Nest] 1501 - 2019-3-12 17:38:27 [NestFactory] Starting Nest application...
[Nest] 1501 - 2019-3-12 17:38:27 [InstanceLoader] PassportModule dependencies initialized +101ms
[Nest] 1501 - 2019-3-12 17:38:27 [InstanceLoader] TypeOrmModule dependencies initialized +0ms
[Nest] 1501 - 2019-3-12 17:38:27 [InstanceLoader] JwtModule dependencies initialized +0ms
[Nest] 1501 - 2019-3-12 17:38:28 [InstanceLoader] TypeOrmCoreModule dependencies initialized +70ms
[Nest] 1501 - 2019-3-12 17:38:28 [ExceptionHandler] No repository for "User" was found. Looks like this entity is not registered in current "default" connection? +1ms
RepositoryNotFoundError: No repository for "User" was found. Looks like this entity is not registered in current "default" connection?
at new RepositoryNotFoundError (/Users/mac/Projects/traduora/dist/node_modules/typeorm/error/RepositoryNotFoundError.js:20:28)

@michalkow michalkow added bug Something isn't working help wanted Extra attention is needed labels Mar 12, 2019
@anthonynsimon
Copy link
Contributor

Hey, just a couple of questions: do you have any configuration override? are you running it via the docker image or a fresh build from source?

@michalkow
Copy link
Author

michalkow commented Mar 12, 2019

It is fresh build from source. Here is my configuration:

NODE_ENV=dev
TR_PORT=8080
TR_SECRET=Mysecret
TR_VIRTUAL_HOST=traduora.mydomain.com

TR_DB_HOST=127.0.0.1
TR_DB_PORT=3306
TR_DB_DATABASE=tr_dev
TR_DB_USER=root
TR_DB_PASSWORD=mypassword

TR_CORS_ENABLED=false
TR_ACCESS_LOGS_ENABLED=true
TR_AUTH_TOKEN_EXPIRES=86400
TR_SIGNUPS_ENABLED=true
TR_MAX_PROJECTS_PER_USER=100
TR_DEFAULT_PROJECT_PLAN=open-source
TR_DB_AUTOMIGRATE=true

TR_MAIL_DEBUG=false
TR_MAIL_SENDER=no-reply@localhost.com
TR_MAIL_HOST=smtp.ethereal.email
TR_MAIL_PORT=587
TR_MAIL_SECURE=false
TR_MAIL_USER=l4kzu3nw7o4x45wz@ethereal.email
TR_MAIL_PASSWORD=3mJgh1g9dpMf3uZaBM

@anthonynsimon
Copy link
Contributor

anthonynsimon commented Mar 12, 2019

I'm only able to reproduce this if I start the application anywhere else other than the in the dist folder.

Assuming the following commands run from the project root:

Works:

cd dist
node src/main.js

I get the same error posted:

node dist/src/main.js

@michalkow
Copy link
Author

Thank you! That solved the problem for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants