Closed RW456 closed 4 years ago
Making progress right now, changed all (most?) of the controllers where req as { user: User }
to req.user as { user: User }
. Also, made sure to copy and update a version of .env
for both web and api. Made sure redis/mongod were installed. You'll also need Discord creds.
I also may have broke everything, we will see.
Use yarn instead
Making progress right now, changed all (most?) of the controllers where
req as { user: User }
toreq.user as { user: User }
. Also, made sure to copy and update a version of.env
for both web and api. Made sure redis/mongod were installed. You'll also need Discord creds.I also may have broke everything, we will see.
Looks like Discord gives the code /?code=xxx
but the server doesn't accept it?
Looks like Discord gives the code
/?code=xxx
but the server doesn't accept it?
Do you get redirected? Are you in the cryb discord? If so check out #programming we've been helping each other out.
needs confirmed if this is an issue
needs confirmed if this is an issue
npm is the issue in this case (it's broken and confirmed by William) https://i.imgur.com/uS0hY1S.png
I'll look into this locally soon, seems like an issue where the dependencies used for TypeScript types aren't properly being installed, might be because those dependencies are listed under devDependencies
in package.json.
Looks like Discord gives the code
/?code=xxx
but the server doesn't accept it?Do you get redirected? Are you in the cryb discord? If so check out #programming we've been helping each other out.
Joined thanks!
dev dependencies can be installed with a flag on npm, but these should be part of the core dependencies anyway.
This happens using yarn as well now.
We just reverted to the last working version, looks like Dependabot messed a couple things up. Try running git pull && git reset --soft 84eb2e1b80ea2c2c558e1d154ffdaa3beacaf972
and then yarn
again and try again. Sorry for the issue, closing this out for now!
This was happening since before with npm though..
My dumbass thought this was related to the dependabot stuff, reopening. Last message still applies with yarn
@jiayang, reopening 🙃
This got fixed already. Closing!
I ran npm run dev, and it's giving me 22 errors involving a "user" and something related to conversion. Node 10, Centos 7, I did edit config file. Here's what it said:
7:23:30 PM - Starting compilation in watch mode... src/controllers/admin.controller.ts(161,60): error TS2345: Argument of type 'User' is not assignable to parameter of type 'string | User'. Type 'User' is missing the following properties from type 'User': id, joinedAt, username, roles, and 13 more. src/controllers/controller.controller.ts(12,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'User' is missing the following properties from type 'User': id, joinedAt, username, roles, and 13 more.
src/controllers/controller.controller.ts(25,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/controller.controller.ts(39,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/invite.controller.ts(12,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/invite.controller.ts(16,89): error TS2345: Argument of type 'User' is not assignable to parameter of type 'string | User'.
Type 'Express.User' is not assignable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/invite.controller.ts(25,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/member.controller.ts(12,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/message.controller.ts(15,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/message.controller.ts(32,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/message.controller.ts(45,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/message.controller.ts(57,31): error TS2345: Argument of type 'Express.User' is not assignable to parameter of type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/room.controller.ts(13,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/room.controller.ts(35,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/room.controller.ts(52,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/room.controller.ts(66,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/room.controller.ts(85,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/room.controller.ts(104,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/room.controller.ts(114,55): error TS2345: Argument of type 'Express.User' is not assignable to parameter of type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/room.controller.ts(123,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/user.controller.ts(13,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
src/controllers/user.controller.ts(25,22): error TS2352: Conversion of type 'Request<Dictionary>' to type '{ user: User; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'user' are incompatible.
Type 'Express.User' is not comparable to type 'import("/home/rob/hildacordCryb/api/src/models/user/index").default'.
7:23:38 PM - Found 22 errors. Watching for file changes.
Am I doing something wrong?