Koen A
01/05/2022, 12:41 PMConnectionNotFoundError2: Connection "default" was not found.
at ConnectionNotFoundError2.TypeORMError2 [as constructor] (/test-project/.sst/artifacts/8a2bd957/src/consumer.js:74327:28)
The ormconfig.json file is located in my project root as it should but it seems the transpiled JS file in the artifacts folder cannot find it.
Are project root json files not included or is some manual build step needed?Mischa Spiegelmock
01/05/2022, 12:42 PMthdxr
01/05/2022, 1:02 PMKoen A
01/05/2022, 1:44 PMthdxr
01/05/2022, 1:46 PMAdrián Mouly
01/05/2022, 1:59 PMKoen A
01/05/2022, 8:01 PMKoen A
01/06/2022, 10:05 AMERROR SyntaxError: Cannot use import statement outside a module
/project-root/src/db/entity/Order.ts:1
import {
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:1001:16)
at Module._compile (internal/modules/cjs/loader.js:1049:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at /project-root/node_modules/typeorm/util/DirectoryExportedClassesLoader.js:42:39
at Array.map (<anonymous>)
at importClassesFromDirectories (/project-root/node_modules/typeorm/util/DirectoryExportedClassesLoader.js:42:10)
thdxr
01/06/2022, 3:50 PMthdxr
01/06/2022, 3:50 PMthdxr
01/06/2022, 3:51 PMthdxr
01/06/2022, 3:51 PMKoen A
01/06/2022, 5:03 PMthdxr
01/07/2022, 7:31 PM