-
Notifications
You must be signed in to change notification settings - Fork 5
Description
hello,
i got this while running docker compose up in server, can you help?
`> [email protected] build /app
tsc
lib/Models/Mongo.Models.ts:32:44 - error TS2554: Expected 1-2 arguments, but got 0.
32 const cursor = Mongo.GridFsBucket.find();
~~~~~~
node_modules/@types/mongodb/index.d.ts:4640:10
4640 find(filter: object, options?: GridFSBucketFindOptions): Cursor;
~~~~~~~~~~~~~~
An argument for 'filter' was not provided.
lib/Models/Passport.Models.ts:61:35 - error TS2345: Argument of type 'null' is not assignable to parameter of type 'false | User | undefined'.
61 return done(error, null);
~~~~
lib/Models/Users.Model.ts:65:43 - error TS2345: Argument of type 'UserAddModel' is not assignable to parameter of type 'Optional<any, string>'.
Type 'UserAddModel' is not assignable to type 'Omit<any, string>'.
Index signature for type 'number' is missing in type 'UserAddModel'.
65 if (count === 0) await Users.create(user);
~~~~
lib/routes/Common.Routes.ts:17:10 - error TS6133: 'IsNotEmptyAny' is declared but its value is never read.
17 function IsNotEmptyAny(object: any): boolean {
~~~~~~~~~~~~~
lib/routes/Files.Routes.ts:332:29 - error TS7006: Parameter 'req' implicitly has an 'any' type.
332 async function DownloadFile(req, res) {
~~~
lib/routes/Files.Routes.ts:332:34 - error TS7006: Parameter 'res' implicitly has an 'any' type.
332 async function DownloadFile(req, res) {
~~~
lib/routes/Users.Routes.ts:26:8 - error TS2554: Expected 1-2 arguments, but got 0.
26 req.logout();
~~~~~~~~
node_modules/@types/passport/index.d.ts:66:20
66 logout(done: (err: any) => void): void;
~~~~~~~~~~~~~~~~~~~~~~~~
An argument for 'done' was not provided.
node_modules/@types/mongodb/index.d.ts:58:74 - error TS2724: '"bson"' has no exported member named 'ObjectID'. Did you mean 'ObjectId'?
58 export { Binary, DBRef, Decimal128, Double, Int32, Long, MaxKey, MinKey, ObjectID, ObjectId, Timestamp } from "bson";
~~~~~~~~
node_modules/bson/bson.d.ts:943:22
943 export declare class ObjectId extends BSONValue {
~~~~~~~~
'ObjectId' is declared here.
node_modules/@types/mongodb/index.d.ts:1198:45 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.
1198 callback?: MongoCallback<Collection>,
~~~~~~~
node_modules/@types/mongodb/index.d.ts:1196:16
1196 collection<TSchema = DefaultSchema>(
~~~~~~~~~~~~~~~~~~~~~~~
This type parameter might need an extends { [key: string]: any; }
constraint.
node_modules/@types/mongodb/index.d.ts:1199:19 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.
1199 ): Collection;
~~~~~~~
node_modules/@types/mongodb/index.d.ts:1196:16
1196 collection<TSchema = DefaultSchema>(
~~~~~~~~~~~~~~~~~~~~~~~
This type parameter might need an extends { [key: string]: any; }
constraint.
node_modules/@types/mongodb/index.d.ts:1203:45 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.
1203 callback?: MongoCallback<Collection>,
~~~~~~~
node_modules/@types/mongodb/index.d.ts:1200:16
1200 collection<TSchema = DefaultSchema>(
~~~~~~~~~~~~~~~~~~~~~~~
This type parameter might need an extends { [key: string]: any; }
constraint.
node_modules/@types/mongodb/index.d.ts:1204:19 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.
1204 ): Collection;
~~~~~~~
node_modules/@types/mongodb/index.d.ts:1200:16
1200 collection<TSchema = DefaultSchema>(
~~~~~~~~~~~~~~~~~~~~~~~
This type parameter might need an extends { [key: string]: any; }
constraint.
node_modules/@types/mongodb/index.d.ts:1244:96 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.
1244 createCollection<TSchema = DefaultSchema>(name: string, callback: MongoCallback<Collection>): void;
~~~~~~~
node_modules/@types/mongodb/index.d.ts:1244:22
1244 createCollection<TSchema = DefaultSchema>(name: string, callback: MongoCallback<Collection>): void;
~~~~~~~~~~~~~~~~~~~~~~~
This type parameter might need an extends { [key: string]: any; }
constraint.
node_modules/@types/mongodb/index.d.ts:1248:27 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.
1248 ): Promise<Collection>;
~~~~~~~
node_modules/@types/mongodb/index.d.ts:1245:22
1245 createCollection<TSchema = DefaultSchema>(
~~~~~~~~~~~~~~~~~~~~~~~
This type parameter might need an extends { [key: string]: any; }
constraint.
node_modules/@types/mongodb/index.d.ts:1252:44 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.
1252 callback: MongoCallback<Collection>,
~~~~~~~
node_modules/@types/mongodb/index.d.ts:1249:22
1249 createCollection<TSchema = DefaultSchema>(
~~~~~~~~~~~~~~~~~~~~~~~
This type parameter might need an extends { [key: string]: any; }
constraint.
node_modules/@types/mongodb/index.d.ts:1384:44 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.
1384 callback: MongoCallback<Collection>,
~~~~~~~
node_modules/@types/mongodb/index.d.ts:1381:22
1381 renameCollection<TSchema = DefaultSchema>(
~~~~~~~~~~~~~~~~~~~~~~~
This type parameter might need an extends { [key: string]: any; }
constraint.
node_modules/@types/mongodb/index.d.ts:1390:27 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.
1390 ): Promise<Collection>;
~~~~~~~
node_modules/@types/mongodb/index.d.ts:1386:22
1386 renameCollection<TSchema = DefaultSchema>(
~~~~~~~~~~~~~~~~~~~~~~~
This type parameter might need an extends { [key: string]: any; }
constraint.
node_modules/@types/mongodb/index.d.ts:1395:44 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ [key: string]: any; }'.
1395 callback: MongoCallback<Collection>,
~~~~~~~
node_modules/@types/mongodb/index.d.ts:1391:22
1391 renameCollection<TSchema = DefaultSchema>(
~~~~~~~~~~~~~~~~~~~~~~~
This type parameter might need an extends { [key: string]: any; }
constraint.
node_modules/@types/mongodb/index.d.ts:2559:21 - error TS2344: Type 'T' does not satisfy the constraint '{ [key: string]: any; }'.
2559 ): ChangeStream;
~
node_modules/@types/mongodb/index.d.ts:2556:11
2556 watch<T = TSchema>(
~~~~~~~~~~~
This type parameter might need an extends { [key: string]: any; }
constraint.
node_modules/@types/mongodb/index.d.ts:2560:111 - error TS2344: Type 'T' does not satisfy the constraint '{ [key: string]: any; }'.
2560 watch<T = TSchema>(options?: ChangeStreamOptions & { session?: ClientSession | undefined }): ChangeStream;
~
node_modules/@types/mongodb/index.d.ts:2560:11
2560 watch<T = TSchema>(options?: ChangeStreamOptions & { session?: ClientSession | undefined }): ChangeStream;
~~~~~~~~~~~
This type parameter might need an extends { [key: string]: any; }
constraint.
node_modules/@types/mongodb/index.d.ts:2911:30 - error TS2344: Type 'TSchema' does not satisfy the constraint '{ _id?: any; }'.
2911 document: OptionalId;
~~~~~~~
node_modules/@types/mongodb/index.d.ts:2909:41
2909 export type BulkWriteInsertOneOperation = {
~~~~~~~
This type parameter might need an extends { _id?: any; }
constraint.
node_modules/mqtt/types/lib/client-options.d.ts:3:31 - error TS7016: Could not find a declaration file for module 'ws'. '/app/node_modules/ws/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/ws
if it exists or add a new declaration (.d.ts) file containing declare module 'ws';
3 import { ClientOptions } from 'ws'
~~~~
Found 22 errors in 8 files.
Errors Files
1 lib/Models/Mongo.Models.ts:32
1 lib/Models/Passport.Models.ts:61
1 lib/Models/Users.Model.ts:65
1 lib/routes/Common.Routes.ts:17
2 lib/routes/Files.Routes.ts:332
1 lib/routes/Users.Routes.ts:26
14 node_modules/@types/mongodb/index.d.ts:58
1 node_modules/mqtt/types/lib/client-options.d.ts:3
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: tsc
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-04-19T14_20_18_103Z-debug.log
The command '/bin/sh -c npm run build' returned a non-zero code: 2
ERROR: Service 'app-backend' failed to build : Build failed
`