smogon / pokemon-showdown

Pokémon battle simulator.
https://pokemonshowdown.com
MIT License
4.77k stars 2.79k forks source link

Build fails in fresh Windows install (TSC) #4422

Closed Slayer95 closed 6 years ago

Slayer95 commented 6 years ago
C:\Users\Ivo\Desktop\Pokemon-Showdown>npm install

> gc-stats@1.1.0 install C:\Users\Ivo\Desktop\Pokemon-Showdown\node_modules\gc-s
tats
> node-pre-gyp install --fallback-to-build

[gc-stats] Success: "C:\Users\Ivo\Desktop\Pokemon-Showdown\node_modules\gc-stats
\build\gcstats\v1.1.0\Release\node-v57-win32-x64\gcstats.node" is installed via
remote
added 255 packages in 116.534s

C:\Users\Ivo\Desktop\Pokemon-Showdown>npm test

> pokemon-showdown@0.11.2 test C:\Users\Ivo\Desktop\Pokemon-Showdown
> eslint --cache . && tsc && mocha

punishments.js(67,2): error TS2416: Property 'forEach' in type 'PunishmentMap' i
s not assignable to the same property in base type 'Map<string, [string, string,
 number, string]>'.
  Type '(callback: (punishment: [string, string, number, string], id: string) =>
 void) => void' is not assignable to type '(callbackfn: (value: [string, string,
 number, string], key: string, map: Map<string, [string, str...'.
    Types of parameters 'callback' and 'callbackfn' are incompatible.
npm ERR! Test failed.  See above for more details.

Environment: Windows 7 Professional SP1

C:\Users\Ivo\Desktop\Pokemon-Showdown>node -v
v8.9.4

C:\Users\Ivo\Desktop\Pokemon-Showdown>npm -v
5.6.0

npm ls: https://gist.github.com/Slayer95/e8aa70dd680e21192ebd338d8387c3ce

Slayer95 commented 6 years ago

Fixed by d995a8fa11f