7rebux / league-tools

A cross-platform desktop app with many League Client exploits (e.g profile customization)
MIT License
51 stars 2 forks source link

node js version? #5

Closed Xarond12 closed 2 years ago

Xarond12 commented 2 years ago

cause im getting this error ERROR

TS2468: Cannot find global value 'Promise'.

ERROR in src/main/index.ts:5:5

TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try npm i --save-dev @types/node. 3 | declare const CONNECT_WEBPACK_ENTRY: string; 4 |

5 | if (require('electron-squirrel-startup')) app.quit(); | ^^^^^^^ 6 | 7 | const createWindow = (): void => { 8 | const mainWindow = new BrowserWindow({

ERROR in src/main/index.ts:33:7

TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try npm i --save-dev @types/node. 31 | 32 | app.on('window-all-closed', () => {

33 | if (process.platform !== 'darwin') app.quit(); | ^^^^^^^ 34 | }); 35 | 36 | app.on('activate', () => {

ERROR in src/renderer/pages/Icons.tsx:67:45

TS2550: Property 'includes' does not exist on type 'Key[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2016' or later. 65 | () => 66 | filter1.filter((i) =>

67 | releaseYearFilter.map((i) => i.key).includes(i.yearReleased) | ^^^^^^^^ 68 | ), 69 | [filter1, releaseYearFilter] 70 | );

ERROR in src/renderer/pages/Icons.tsx:74:46

TS2550: Property 'includes' does not exist on type 'Key[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2016' or later. 72 | () => 73 | filter3.filter((i) =>

74 | eSportsEventFilter.map((i) => i.key).includes(i.eSportsEvent) | ^^^^^^^^ 75 | ), 76 | [filter3, eSportsEventFilter] 77 | );

ERROR in src/renderer/pages/Icons.tsx:81:45

TS2550: Property 'includes' does not exist on type 'Key[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2016' or later. 79 | () => 80 | filter4.filter((i) =>

81 | eSportsTeamFilter.map((i) => i.key).includes(i.eSportsTeam) | ^^^^^^^^ 82 | ), 83 | [filter4, eSportsTeamFilter] 84 | );

ERROR in src/renderer/pages/Icons.tsx:86:41

TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. 84 | ); 85 | const filter6 = useMemo(

86 | () => filter5.filter((i) => i.title.includes(titleFilter)), | ^^^^^^^^ 87 | [filter5, titleFilter] 88 | ); 89 |

ERROR in src/renderer/pages/Icons.tsx:95:23

TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. 93 | 94 | useEffect(() => {

95 | const fetchData = async () => { | ^^^^^^^^^^^^^ 96 | const response = await fetch(ICON_DATA_URL); 97 | const data = await response.json(); 98 |

ERROR in src/renderer/pages/Icons.tsx:99:32

TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. 97 | const data = await response.json(); 98 |

99 | const releaseYears = new Set(data.map((x: any) => x.yearReleased).sort()); | ^^^ 100 | const eSportsEvents = new Set( 101 | data.map((x: any) => x.esportsEvent).sort() 102 | );

ERROR in src/renderer/pages/Icons.tsx:100:33

TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. 98 | 99 | const releaseYears = new Set(data.map((x: any) => x.yearReleased).sort());

100 | const eSportsEvents = new Set( | ^^^ 101 | data.map((x: any) => x.esportsEvent).sort() 102 | ); 103 | const eSportsTeams = new Set(data.map((x: any) => x.esportsTeam).sort());

ERROR in src/renderer/pages/Icons.tsx:103:32

TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. 101 | data.map((x: any) => x.esportsEvent).sort() 102 | );

103 | const eSportsTeams = new Set(data.map((x: any) => x.esportsTeam).sort()); | ^^^ 104 | 105 | setReleaseYearData( 106 | Array.from(releaseYears).map(

ERROR in src/renderer/pages/Icons.tsx:106:15

TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. 104 | 105 | setReleaseYearData(

106 | Array.from(releaseYears).map( | ^^^^ 107 | (x) => 108 | ({ title: String(x), key: x, value: true } as FilterDropdownItem) 109 | )

ERROR in src/renderer/pages/Icons.tsx:107:12

TS7006: Parameter 'x' implicitly has an 'any' type. 105 | setReleaseYearData( 106 | Array.from(releaseYears).map(

107 | (x) => | ^ 108 | ({ title: String(x), key: x, value: true } as FilterDropdownItem) 109 | ) 110 | );

ERROR in src/renderer/pages/Icons.tsx:113:15

TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. 111 | setReleaseYearFilter(releaseYearData); 112 | setESportsEventData(

113 | Array.from(eSportsEvents) | ^^^^ 114 | .filter((x) => x !== undefined) 115 | .map((x) => ({ title: x, key: x, value: true } as FilterDropdownItem)) 116 | );

ERROR in src/renderer/pages/Icons.tsx:114:20

TS7006: Parameter 'x' implicitly has an 'any' type. 112 | setESportsEventData( 113 | Array.from(eSportsEvents)

114 | .filter((x) => x !== undefined) | ^ 115 | .map((x) => ({ title: x, key: x, value: true } as FilterDropdownItem)) 116 | ); 117 | setESportsEventFilter(eSportsEventData);

ERROR in src/renderer/pages/Icons.tsx:115:17

TS7006: Parameter 'x' implicitly has an 'any' type. 113 | Array.from(eSportsEvents) 114 | .filter((x) => x !== undefined)

115 | .map((x) => ({ title: x, key: x, value: true } as FilterDropdownItem)) | ^ 116 | ); 117 | setESportsEventFilter(eSportsEventData); 118 | setESportsTeamData(

ERROR in src/renderer/pages/Icons.tsx:119:15

TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. 117 | setESportsEventFilter(eSportsEventData); 118 | setESportsTeamData(

119 | Array.from(eSportsTeams) | ^^^^ 120 | .filter((x) => x !== undefined) 121 | .map((x) => ({ title: x, key: x, value: true } as FilterDropdownItem)) 122 | );

ERROR in src/renderer/pages/Icons.tsx:120:20

TS7006: Parameter 'x' implicitly has an 'any' type. 118 | setESportsTeamData( 119 | Array.from(eSportsTeams)

120 | .filter((x) => x !== undefined) | ^ 121 | .map((x) => ({ title: x, key: x, value: true } as FilterDropdownItem)) 122 | ); 123 | setESportsTeamFilter(eSportsTeamData);

ERROR in src/renderer/pages/Icons.tsx:121:17

TS7006: Parameter 'x' implicitly has an 'any' type. 119 | Array.from(eSportsTeams) 120 | .filter((x) => x !== undefined)

121 | .map((x) => ({ title: x, key: x, value: true } as FilterDropdownItem)) | ^ 122 | ); 123 | setESportsTeamFilter(eSportsTeamData); 124 |

7rebux commented 2 years ago

I'm gonna try to fix it for Windows asap. Works fine on Linux systems.