Open Lordtien opened 4 years ago
Oh, you also need to upgrade @types/react
TS2305: Module '"/home/travis/build/ExpeditionRPG/expedition/node_modules/@types/react/index"' has no exported member 'useEffect'.
Having type mismatches
ERROR in [at-loader] ../api/src/Handlers.ts:477:11
TS2345: Argument of type 'string' is not assignable to parameter of type 'FeedbackType'.
ERROR in [at-loader] ../api/src/Handlers.ts:493:11
TS2345: Argument of type 'string' is not assignable to parameter of type 'FeedbackType'.
ERROR in [at-loader] ../../shared/parse/Node.tsx:78:19
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string | number'.
Type 'undefined' is not assignable to type 'string | number'.
ERROR in [at-loader] ../../shared/parse/Node.tsx:223:22
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ../../shared/parse/Node.tsx:301:47
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/components/views/quest/cardtemplates/combat/Actions.tsx:25:25
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/components/views/quest/cardtemplates/combat/Actions.tsx:122:48
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/actions/SavedQuests.tsx:109:27
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/components/views/quest/cardtemplates/roleplay/Roleplay.tsx:51:7
TS2322: Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/components/views/quest/cardtemplates/roleplay/Roleplay.tsx:113:3
TS2322: Type '{ choices: Choice[]; content: RoleplayElement[]; ctx: TemplateContext; icon: string | undefined; ...' is not assignable to type 'RoleplayResult'.
Types of property 'icon' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/components/views/quest/cardtemplates/roleplay/Roleplay.tsx:118:33
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/actions/Multiplayer.tsx:177:33
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ../api/src/Handlers.ts:477:11
TS2345: Argument of type 'string' is not assignable to parameter of type 'FeedbackType'.
ERROR in [at-loader] ../api/src/Handlers.ts:493:11
TS2345: Argument of type 'string' is not assignable to parameter of type 'FeedbackType'.
ERROR in [at-loader] ../../shared/parse/Node.tsx:78:19
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string | number'.
Type 'undefined' is not assignable to type 'string | number'.
ERROR in [at-loader] ../../shared/parse/Node.tsx:223:22
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ../../shared/parse/Node.tsx:301:47
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/components/views/quest/cardtemplates/combat/Actions.tsx:25:25
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/components/views/quest/cardtemplates/combat/Actions.tsx:122:48
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/actions/SavedQuests.tsx:109:27
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/components/views/quest/cardtemplates/roleplay/Roleplay.tsx:51:7
TS2322: Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/components/views/quest/cardtemplates/roleplay/Roleplay.tsx:113:3
TS2322: Type '{ choices: Choice[]; content: RoleplayElement[]; ctx: TemplateContext; icon: string | undefined; ...' is not assignable to type 'RoleplayResult'.
Types of property 'icon' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/components/views/quest/cardtemplates/roleplay/Roleplay.tsx:118:33
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ./src/actions/Multiplayer.tsx:177:33
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ../../shared/parse/Crawler.tsx:30:21
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ../../shared/parse/Crawler.tsx:101:29
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ℹ 「wdm」: Failed to compile.
ERROR in [at-loader] ../../shared/parse/Crawler.tsx:30:21
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ERROR in [at-loader] ../../shared/parse/Crawler.tsx:101:29
TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
ℹ 「wdm」: Failed to compile.
Is this expected on a version update?
@toddmedema All the string | undefined
mismatches seems to be originating from the Cheerio
interface.
I'm putting checks and reassignments to fix as of now. Let me know if you have a better approach.
Update: Resolved type mismatches. More errors in browser's console now.
Re the first error, looks like the only place that uses fetch-retry is here: https://github.com/ExpeditionRPG/expedition/blob/master/services/app/src/actions/ServerStatus.tsx#L1
You could try upgrading the version, changing the import to be import {fetch} from
, or Googling problems with that library and this version of React.
Not sure about the second error - there's a chance it's related to a browser extension. Could you try running it in incognito mode after you fix the first error, and let me know if you still see the second error?
Hey @toddmedema I have upgraded React to use hooks here, but tests are failing. I am guessing it's because of node_modules being cached. I want you to take look and let me know how to move on this.
Also, regarding the change, I didn't get the whole context of what we're doing here, but the changes will do what you've mentioned.