Skip to content

failing build #89

@CrazyWolf13

Description

@CrazyWolf13

Hi @javedh-dev

After wanting to upgrade from to 3.6 I get the following error on npm run build:

added 224 packages, removed 78 packages, changed 122 packages, and audited 857 packages in 38s

163 packages are looking for funding
  run `npm fund` for details

10 vulnerabilities (3 low, 6 moderate, 1 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm notice
npm notice New minor version of npm available! 11.5.2 -> 11.6.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.6.0
npm notice To update run: npm install -g npm@11.6.0
npm notice

> build
> npm run build --workspace=backend && npm run build --workspace=frontend


> backend@0.0.1 build
> tsc && tsc-alias

src/db/init.ts:1:10 - error TS2305: Module '"./index.js"' has no exported member 'performDbMigrations'.

1 import { performDbMigrations, seedData } from "./index.js";
           ~~~~~~~~~~~~~~~~~~~

src/db/init.ts:1:31 - error TS2305: Module '"./index.js"' has no exported member 'seedData'.

1 import { performDbMigrations, seedData } from "./index.js";
                                ~~~~~~~~

src/db/migrate.ts:4:10 - error TS2305: Module '"./index.js"' has no exported member 'performDbMigrations'.

4 import { performDbMigrations } from "./index.js";
           ~~~~~~~~~~~~~~~~~~~

src/db/migrate.ts:24:13 - error TS2339: Property 'seedData' does not exist on type 'typeof import("/opt/tracktor/app/backend/src/db/index", { with: { "resolution-mode": "import" } })'.

24     const { seedData } = await import("./index.js");
               ~~~~~~~~

src/db/migrations/20250806_00_init.ts:2:15 - error TS2305: Module '"../index.js"' has no exported member 'Migration'.

2 import type { Migration } from "../index.js";
                ~~~~~~~~~

src/db/migrations/20250806_00_init.ts:4:48 - error TS7031: Binding element 'queryInterface' implicitly has an 'any' type.

4 export const up: Migration = async ({ context: queryInterface }) => {
                                                 ~~~~~~~~~~~~~~

src/db/migrations/20250806_00_init.ts:336:50 - error TS7031: Binding element 'queryInterface' implicitly has an 'any' type.

336 export const down: Migration = async ({ context: queryInterface }) => {
                                                     ~~~~~~~~~~~~~~

src/db/status.ts:13:8 - error TS2307: Cannot find module '@models/index.js' or its corresponding type declarations.

13 } from "@models/index.js";
          ~~~~~~~~~~~~~~~~~~

src/models/Auth.ts:34:5 - error TS2740: Type 'LibSQLDatabase<{ authTable: SQLiteTableWithColumns<{ name: "auth"; schema: undefined; columns: { created_at: SQLiteColumn<{ name: "created_at"; tableName: "auth"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; ... 8 more ...; generated: undefined; }, {}, { ...; }>; updated_at: SQLit...' is missing the following properties from type 'Sequelize': fn, col, cast, literal, and 62 more.

34     sequelize: db,
       ~~~~~~~~~

  ../../node_modules/sequelize/types/model.d.ts:1855:3
    1855   sequelize: Sequelize;
           ~~~~~~~~~
    The expected type comes from property 'sequelize' which is declared here on type 'InitOptions<Auth>'

src/models/Config.ts:42:5 - error TS2740: Type 'LibSQLDatabase<{ authTable: SQLiteTableWithColumns<{ name: "auth"; schema: undefined; columns: { created_at: SQLiteColumn<{ name: "created_at"; tableName: "auth"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; ... 8 more ...; generated: undefined; }, {}, { ...; }>; updated_at: SQLit...' is missing the following properties from type 'Sequelize': fn, col, cast, literal, and 62 more.

42     sequelize: db,
       ~~~~~~~~~

  ../../node_modules/sequelize/types/model.d.ts:1855:3
    1855   sequelize: Sequelize;
           ~~~~~~~~~
    The expected type comes from property 'sequelize' which is declared here on type 'InitOptions<Config>'

src/models/FuelLog.ts:94:5 - error TS2740: Type 'LibSQLDatabase<{ authTable: SQLiteTableWithColumns<{ name: "auth"; schema: undefined; columns: { created_at: SQLiteColumn<{ name: "created_at"; tableName: "auth"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; ... 8 more ...; generated: undefined; }, {}, { ...; }>; updated_at: SQLit...' is missing the following properties from type 'Sequelize': fn, col, cast, literal, and 62 more.

94     sequelize: db,
       ~~~~~~~~~

  ../../node_modules/sequelize/types/model.d.ts:1855:3
    1855   sequelize: Sequelize;
           ~~~~~~~~~
    The expected type comes from property 'sequelize' which is declared here on type 'InitOptions<FuelLog>'

src/models/Insurance.ts:120:5 - error TS2740: Type 'LibSQLDatabase<{ authTable: SQLiteTableWithColumns<{ name: "auth"; schema: undefined; columns: { created_at: SQLiteColumn<{ name: "created_at"; tableName: "auth"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; ... 8 more ...; generated: undefined; }, {}, { ...; }>; updated_at: SQLit...' is missing the following properties from type 'Sequelize': fn, col, cast, literal, and 62 more.

120     sequelize: db,
        ~~~~~~~~~

  ../../node_modules/sequelize/types/model.d.ts:1855:3
    1855   sequelize: Sequelize;
           ~~~~~~~~~
    The expected type comes from property 'sequelize' which is declared here on type 'InitOptions<Insurance>'

src/models/MaintenanceLog.ts:101:5 - error TS2740: Type 'LibSQLDatabase<{ authTable: SQLiteTableWithColumns<{ name: "auth"; schema: undefined; columns: { created_at: SQLiteColumn<{ name: "created_at"; tableName: "auth"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; ... 8 more ...; generated: undefined; }, {}, { ...; }>; updated_at: SQLit...' is missing the following properties from type 'Sequelize': fn, col, cast, literal, and 62 more.

101     sequelize: db,
        ~~~~~~~~~

  ../../node_modules/sequelize/types/model.d.ts:1855:3
    1855   sequelize: Sequelize;
           ~~~~~~~~~
    The expected type comes from property 'sequelize' which is declared here on type 'InitOptions<MaintenanceLog>'

src/models/PUCC.ts:111:5 - error TS2740: Type 'LibSQLDatabase<{ authTable: SQLiteTableWithColumns<{ name: "auth"; schema: undefined; columns: { created_at: SQLiteColumn<{ name: "created_at"; tableName: "auth"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; ... 8 more ...; generated: undefined; }, {}, { ...; }>; updated_at: SQLit...' is missing the following properties from type 'Sequelize': fn, col, cast, literal, and 62 more.

111     sequelize: db,
        ~~~~~~~~~

  ../../node_modules/sequelize/types/model.d.ts:1855:3
    1855   sequelize: Sequelize;
           ~~~~~~~~~
    The expected type comes from property 'sequelize' which is declared here on type 'InitOptions<PollutionCertificate>'

src/models/Vehicle.ts:102:14 - error TS2339: Property 'getQueryInterface' does not exist on type 'LibSQLDatabase<{ authTable: SQLiteTableWithColumns<{ name: "auth"; schema: undefined; columns: { created_at: SQLiteColumn<{ name: "created_at"; tableName: "auth"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; ... 8 more ...; generated: undefined; }, {}, { ...; }>; updated_at: SQLit...'.

102             .getQueryInterface()
                 ~~~~~~~~~~~~~~~~~

src/models/Vehicle.ts:153:5 - error TS2740: Type 'LibSQLDatabase<{ authTable: SQLiteTableWithColumns<{ name: "auth"; schema: undefined; columns: { created_at: SQLiteColumn<{ name: "created_at"; tableName: "auth"; dataType: "string"; columnType: "SQLiteText"; data: string; driverParam: string; ... 8 more ...; generated: undefined; }, {}, { ...; }>; updated_at: SQLit...' is missing the following properties from type 'Sequelize': fn, col, cast, literal, and 62 more.

153     sequelize: db,
        ~~~~~~~~~

  ../../node_modules/sequelize/types/model.d.ts:1855:3
    1855   sequelize: Sequelize;
           ~~~~~~~~~
    The expected type comes from property 'sequelize' which is declared here on type 'InitOptions<Vehicle>'


Found 16 errors in 11 files.

Errors  Files
     2  src/db/init.ts:1
     2  src/db/migrate.ts:4
     3  src/db/migrations/20250806_00_init.ts:2
     1  src/db/status.ts:13
     1  src/models/Auth.ts:34
     1  src/models/Config.ts:42
     1  src/models/FuelLog.ts:94
     1  src/models/Insurance.ts:120
     1  src/models/MaintenanceLog.ts:101
     1  src/models/PUCC.ts:111
     2  src/models/Vehicle.ts:102
npm error Lifecycle script `build` failed with error:
npm error code 2
npm error path /opt/tracktor/app/backend
npm error workspace backend@0.0.1
npm error location /opt/tracktor/app/backend
npm error command failed
npm error command sh -c tsc && tsc-alias

Metadata

Metadata

Assignees

No one assigned

    Labels

    IssueIssue in existing applicationbackendAPI and backend related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions