jpwahle / cs-insights-backend

API server of the cs-insights project. This is the main part of storing data and accessing an external data analysis endpoint. It uses a mongoDB instance to store everything and queries the cs-insights-prediction-endpoint to get machine learning results.
https://jpwahle.github.io/cs-insights-backend/
MIT License
7 stars 0 forks source link

Docker compose fails #57

Closed jpwahle closed 2 years ago

jpwahle commented 2 years ago

Describe the bug Docker compute fails with ERROR: Service 'api' failed to build see below.

` => ERROR [6/6] RUN npm run build --prod 3.1s


[6/6] RUN npm run build --prod:

10 0.294 npm WARN config production Use --omit=dev instead.

10 0.301

10 0.301 > nlp-land-backend@0.4.1 build

10 0.301 > tsc -p .

10 0.301

10 3.098 src/app/controllers/frontend/papers.ts(88,45): error TS2769: No overload matches this call.

10 3.098 Overload 1 of 3, '(callback?: Callback<Paper[]> | undefined): Query<Paper[], Paper, {}, Paper>', gave the following error.

10 3.098 Argument of type 'FilterMongo' is not assignable to parameter of type 'Callback<Paper[]>'.

10 3.098 Type 'FilterMongo' provides no match for the signature '(error: CallbackError, result: Paper[]): void'.

10 3.098 Overload 2 of 3, '(filter: FilterQuery, callback?: Callback<Paper[]> | undefined): Query<Paper[], Paper, {}, Paper>', gave the following error.

10 3.098 Argument of type 'FilterMongo' is not assignable to parameter of type 'FilterQuery'.

10 3.098 Type 'FilterMongo' is not assignable to type '{ title?: Condition | undefined; abstractText?: Condition | undefined; abstractExtractor?: Condition<"grobid" | "anthology" | "rulebased"> | undefined; ... 74 more ...; validateSync?: Condition<...> | undefined; }'.

10 3.098 Types of property 'typeOfPaper' are incompatible.

10 3.098 Type '{ $in: string[]; } | undefined' is not assignable to type 'Condition<"journal" | "conference" | "demo" | "workshop" | "poster" | "tutorial" | "doctoralconsortium" | "other"> | undefined'.

10 3.098 Type '{ $in: string[]; }' is not assignable to type 'Condition<"journal" | "conference" | "demo" | "workshop" | "poster" | "tutorial" | "doctoralconsortium" | "other"> | undefined'.

10 3.098 Type '{ $in: string[]; }' is not assignable to type 'QuerySelector<RegExp | "journal" | "conference" | "demo" | "workshop" | "poster" | "tutorial" | "doctoralconsortium" | "other">'.

10 3.098 Types of property '$in' are incompatible.

10 3.098 Type 'string[]' is not assignable to type '(RegExp | "journal" | "conference" | "demo" | "workshop" | "poster" | "tutorial" | "doctoralconsortium" | "other")[]'.

10 3.098 Type 'string' is not assignable to type 'RegExp | "journal" | "conference" | "demo" | "workshop" | "poster" | "tutorial" | "doctoralconsortium" | "other"'.

10 3.098 Overload 3 of 3, '(filter: FilterQuery, projection?: any, options?: QueryOptions | null | undefined, callback?: Callback<Paper[]> | undefined): Query<...>', gave the following error.

10 3.098 Argument of type 'FilterMongo' is not assignable to parameter of type 'FilterQuery'.


executor failed running [/bin/sh -c npm run build --prod]: exit code: 2 ERROR: Service 'api' failed to build : Build failed`

trannel commented 2 years ago

If i understand correctly, you are trying to run npm run build --prod? Which branch are you on? On my end I could not reproduce an error running the command. Did you run npm install beforehand to download all packages?

jpwahle commented 2 years ago

I ran docker-compose up --build as per the production readme.

trannel commented 2 years ago

Fixed in #58