-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
bug: Starting server with yarn start
errors with RepositoryNotFoundError
#49
Comments
yarn start
errors RepositoryNotFoundError
yarn start
errors with RepositoryNotFoundError
I think I have a quick and dirty patch I can make. Just making (and possibly keeping open) a connection when the server starts will probably work. Update: This did not work. After some investigating it may be an issue with how we load our entities. |
I'll be assigning Urgent to this issue; Please link a PR you think would fix it when it's ready. |
Working on it. |
Sounds good; What's the TS code look like? Are you sure you handled the asnyc/await properly? |
import { Entity, Column, PrimaryColumn } from 'typeorm'
import config from '../config'
@Entity()
export class Document {
@PrimaryColumn({
// Enforce key length
length: config.options.keyLength
})
id: string
@Column()
content: string
} It has the class decorator but doesn't seem to have any field decorators |
I think that in order to fix this we need to start using a different TS compiler. I suggest rollup with the rollup typescript plugin. |
Rest in peace What else is there? I guess rollup could be fine, too. |
Update: After some research, esbuild is not a viable option. It has no support for decorators. See more here.
I'll make an issue when this is confirmed to be an issue with Update: This was confirmed to be an issue with |
Webpack, Rollup, and standard TSC are probably the best options. TSC may be the best out of those. We haven't needed a more advanced build tool chain yet which is the main purpose of tools like Rollup. |
Sounds good to me; |
Alright. I'll put up a branch and move to |
Done. See the |
REMEMBER: Issues related to the cli client or frontend will not be tolerated in this repo. This is for server/backend issues only. Check the box below if you understand:
Describe the bug
Starting server with
yarn start
errors withRepositoryNotFoundError: No repository for "undefined" was found. Looks like this entity is not registered in current "default" connection?
.Stack trace:
To Reproduce
yarn start
Expected behavior
The server should've ran with no issues.
Screenshots
N/A
Additional context
ts-node
(yarn watch
). I'm unsure as to why.The text was updated successfully, but these errors were encountered: