You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Minor bug: After building a project, there is require is not defined error in compiled server app.js, for some reason, browser template gets compiled into the final app.js (This is not happening in Sapper). It should be just removed, it shouldn't affect functionality.
After removing this, the primary problem occurs.
ColumnTypeUndefinedError2: Column type for ProductImage#url is not defined and cannot be guessed. Make sure you have turned on an "emitDecoratorMetadata": true option in tsconfig.json. Also make sure you have imported "reflect-metadata" on top of the main entry file in your application (before any entity imported).If you are using JavaScript instead of TypeScript you must explicitly provide a column type.
Well firstly, it looks like reflect-metadata doesn't work much good. Also I encountered various circular dependencies issues (Product.ts is referencing ProductImage.ts and vice-versa) (mainly in Sapper).
Severity
Because of this problem, I can't use TypeORM, and since it's not working also in Sapper, I can't use it at all with combination of Svelte SSR.
Thanks.
The text was updated successfully, but these errors were encountered:
I guess that the underlying problem is that you use Vite there, which uses ESBuild, which does not support the emitDecoratorMetadata setting. You need to find a Vite plugin that transpiles TS/JS files with the tsc compiler.
Maybe we should document this in troubleshooting/FAQ
Describe the bug
Minor bug: After building a project, there is
require is not defined
error in compiled serverapp.js
, for some reason, browser template gets compiled into the final app.js (This is not happening in Sapper). It should be just removed, it shouldn't affect functionality.After removing this, the primary problem occurs.
Well firstly, it looks like reflect-metadata doesn't work much good. Also I encountered various circular dependencies issues (Product.ts is referencing ProductImage.ts and vice-versa) (mainly in Sapper).
To Reproduce
Reproduction repository
Expected behavior
TypeORM should work just fine.
Information about your SvelteKit Installation:
Diagnostics
System:
OS: Windows 10 10.0.19042
Binaries:
Node: 15.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - ~\AppData\Roaming\npm\yarn.CMD
npm: 7.7.6 - C:\Program Files\nodejs\npm.CMD
npmPackages:
@sveltejs/kit: next => 1.0.0-next.96
svelte: ^3.29.0 => 3.37.0
vite: ^2.1.0 => 2.1.5
Severity
Because of this problem, I can't use TypeORM, and since it's not working also in Sapper, I can't use it at all with combination of Svelte SSR.
Thanks.
The text was updated successfully, but these errors were encountered: