timkurvers / redota

Revisit past Dota 2 matches in the browser
https://timkurvers.github.io/redota
MIT License
51 stars 7 forks source link

Can't resolve compiled.cjs #82

Closed 0xJas0n closed 1 year ago

0xJas0n commented 1 year ago

Got everything set up smoothly, except that the webpack throws the following error:

ERROR in ./src/lib/parser/defs.js 2:0-46
Module not found: Error: Can't resolve '../../../dota/compiled.cjs' in 'C:\Users\jason\projects\reDota\src\lib\parser'
resolve '../../../dota/compiled.cjs' in 'C:\Users\jason\projects\reDota\src\lib\parser'
  using description file: C:\Users\jason\projects\reDota\package.json (relative path: ./src/lib/parser)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: C:\Users\jason\projects\reDota\package.json (relative path: ./dota/compiled.cjs)
      Field 'browser' doesn't contain a valid alias configuration
      C:\Users\jason\projects\reDota\dota\compiled.cjs doesn't exist
 @ ./src/lib/parser/Parser.js 11:0-146 85:30-60 85:66-96 91:20-40 122:26-56 123:32-62 123:68-98 129:21-41 166:21-40 364:19-53 545:13-28 546:13-28
 @ ./src/lib/replay/Replay.js 4:0-41 86:22-28
 @ ./src/ui/pages/MatchPage.jsx 4:0-48 61:18-24
 @ ./src/ui/ReDota.jsx 8:33-10:24
 @ ./src/ui/bootstrap.jsx 3:0-34 5:50-56

Im not entirely sure where to get this file from or how to generate it.

timkurvers commented 1 year ago

Ah good point, this step is missing from the README. Will add it shortly.

Make sure to run npm run build:protos at least once, to transform Valve's game definitions into something JavaScript-compatible.

timkurvers commented 1 year ago

Documented as of 30897082785081cb51f71ba01c0591731ef0fee7.