Ross Coundon
08/16/2021, 5:09 PMimport { EnvVars } from '@/types/leadent';
and in our tsconfig.json in the root of the project we have:
"paths": {
"@/*": ["main/*"]
}
Everything builds fine locally and sst start
works perfectly.
However in Seed we get a lot of compilation errors which look to be because that import hasn't been resolved.
How do I tell Seed to honour the alias?Frank
sst deploy
in Seed should behave the same way as running it locally. Can you send me a link to the build?thdxr
08/16/2021, 5:23 PMbaseUrl
set in tsconfig
Ross Coundon
08/16/2021, 5:24 PMRoss Coundon
08/16/2021, 5:24 PM{
"compilerOptions": {
"plugins": [
{
"transform": "ts-optchain/transform"
}
],
"typeRoots": [
"./types",
"./node_modules/@types"
],
"resolveJsonModule": true,
"target": "ES2019",
"module": "commonjs",
"allowJs": true,
"checkJs": false,
"sourceMap": true,
"outDir": "./.build",
"removeComments": false,
"strict": true,
"noImplicitAny": true,
"esModuleInterop": true,
"inlineSourceMap": false,
"inlineSources": false,
"skipLibCheck": true,
"declarationMap": true,
"declaration": true,
"preserveConstEnums": true,
"baseUrl": "src",
"experimentalDecorators": true,
"paths": {
"@/*": [
"main/*"
]
}
},
"exclude": [
"./jest.config.js",
"./node_modules/**/*",
"./build/**/*",
"types"
],
"include": [
"lib",
"src"
]
}
Ross Coundon
08/16/2021, 5:26 PMRoss Coundon
08/16/2021, 5:29 PMsrc/main/handlers/api.ts(16,72): error TS2307: Cannot find module '@/types/leadent' or its corresponding type declarations.
src/main/handlers/offersQueue.ts(7,65): error TS2307: Cannot find module '@/types/leadent' or its corresponding type declarations.
src/main/handlers/populator.ts(21,27): error TS2307: Cannot find module '@/types/leadent' or its corresponding type declarations.
src/main/lib/Utils.ts(7,27): error TS2307: Cannot find module '@/types/leadent' or its corresponding type declarations.
src/main/transit/db/OmwDb.ts(21,8): error TS2307: Cannot find module '@/types/leadent' or its corresponding type declarations.
src/main/transit/db/OmwDb.ts(350,44): error TS7006: Parameter 'slot' implicitly has an 'any' type.
Ross Coundon
08/16/2021, 5:30 PMFrank