Skip to content

Conversation

@taljacob2
Copy link
Member

@taljacob2 taljacob2 commented Aug 30, 2025

Fixed #34 (comment)

When running in the backend npm run dev:

/home/tal/Code/NextStep/nextstep-backend/node_modules/ts-node/src/index.ts:859
    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
src/models/resume_model.ts:28:13 - error TS2322: Type 'ObjectId' is not assignable to type 'string'.

28             id: ret._id,
               ~~

  src/types/resume_types.ts:27:5
    27     id: string;
           ~~
    The expected type comes from property 'id' which is declared here on type 'ResumeData'
src/models/resume_model.ts:31:28 - error TS2339: Property 'updatedAt' does not exist on type '{ version: number; createdAt: NativeDate; owner: ObjectId; rawContentLink: string; parsedData?: { aboutMe?: string | null | undefined; skills?: string[] | null | undefined; ... 5 more ...; score?: number | ... 1 more ... | undefined; } | null | undefined; } & { ...; } & { ...; }'.

31             updatedAt: ret.updatedAt,
                              ~~~
src/models/resume_model.ts:34:13 - error TS2322: Type '{ aboutMe?: string | null | undefined; skills?: string[] | null | undefined; fileName?: string | null | undefined; roleMatch?: string | null | undefined; experience?: string[] | null | undefined; jobDescription?: string | ... 1 more ... | undefined; feedback?: string | ... 1 more ... | undefined; score?: number | .....' is not assignable to type 'ParsedResume'.
  Type 'undefined' is not assignable to type 'ParsedResume'.

34             parsedData: ret.parsedData
               ~~~~

  src/types/resume_types.ts:31:5
    31     parsedData: ParsedResume;
           ~~~~
    The expected type comes from property 'parsedData' which is declared here on type 'ResumeData'

    at createTSError (/home/tal/Code/NextStep/nextstep-backend/node_modules/ts-node/src/index.ts:859:12)
    at reportTSError (/home/tal/Code/NextStep/nextstep-backend/node_modules/ts-node/src/index.ts:863:19)
    at getOutput (/home/tal/Code/NextStep/nextstep-backend/node_modules/ts-node/src/index.ts:1077:36)
    at Object.compile (/home/tal/Code/NextStep/nextstep-backend/node_modules/ts-node/src/index.ts:1433:41)
    at Module.m._compile (/home/tal/Code/NextStep/nextstep-backend/node_modules/ts-node/src/index.ts:1617:30)
    at node:internal/modules/cjs/loader:1820:10
    at Object.require.extensions.<computed> [as .ts] (/home/tal/Code/NextStep/nextstep-backend/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1423:32)
    at Function._load (node:internal/modules/cjs/loader:1246:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
    at Module.require (node:internal/modules/cjs/loader:1445:12)
    at require (node:internal/modules/helpers:135:16)
    at Object.<anonymous> (/home/tal/Code/NextStep/nextstep-backend/src/services/resume_service.ts:12:1)
    at Module._compile (node:internal/modules/cjs/loader:1688:14)
    at Module.m._compile (/home/tal/Code/NextStep/nextstep-backend/node_modules/ts-node/src/index.ts:1618:23) {
  diagnosticCodes: [ 2322, 2339, 2322 ]
}
[nodemon] app crashed - waiting for file changes before starting...

@taljacob2 taljacob2 requested review from LiavTB and Lina0Elman August 30, 2025 07:34
@taljacob2 taljacob2 self-assigned this Aug 30, 2025
@taljacob2 taljacob2 added the bug Something isn't working label Aug 30, 2025
@taljacob2 taljacob2 merged commit a05dc7d into master Aug 30, 2025
4 checks passed
@taljacob2 taljacob2 deleted the fix-resumedata-in-linux branch August 30, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants