Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sourceMaps and vscode debug configurations #1707

Merged
merged 3 commits into from
Jan 11, 2021

Conversation

aviettran
Copy link
Contributor

These are tooling changes that I made for another upcoming change. I want to get them reviewed in their own separate PR.

Source maps:
Unlike the server, these maps are stored alongside the transpired js. Browsers make requests for them when dev tools are in use.

Launch configs:
These require an already running HTTP server. You can launch the debugger from vscode and it will build and then launch Chrome.

@Zarel Zarel changed the title sourceMaps and vscode debug configurations Add sourceMaps and vscode debug configurations Jan 11, 2021
@Zarel Zarel merged commit 1f3c8cf into smogon:master Jan 11, 2021
@Zarel
Copy link
Member

Zarel commented Jan 11, 2021

Thanks!

@AnnikaCodes
Copy link
Collaborator

AnnikaCodes commented May 4, 2022

This seems to be causing build failures. It first complained about a missing source-map dependency; even after installing that there is a more complex error:

$ node build full
Syncing data from Git repository... From https://github.com/smogon/pokemon-showdown
   84f3b4ad4..94cc6115c  master     -> origin/master
DONE
Loading gen 6 data... DONE
Building `data/search-index.js`...
(WARNING: NO ARTICLES)
DONE
Building `data/teambuilder-tables.js`... DONE
Building `data/pokedex.js`... DONE
Building `data/moves,items,abilities,typechart,learnsets.js`...DONE
Updating file `data/learnsets-g6`... DONE
Updating animated sprite dimensions... SKIPPED
Updating version... DONE
Compiling TS files... /Users/annika/pokemon-showdown-client/build-tools/compiler.js:67
      consumer.eachMapping(function (mapping) {
               ^

TypeError: consumer.eachMapping is not a function
    at combineResults (/Users/annika/pokemon-showdown-client/build-tools/compiler.js:67:16)
    at Object.compileToFile (/Users/annika/pokemon-showdown-client/build-tools/compiler.js:212:20)
    at Object.<anonymous> (/Users/annika/pokemon-showdown-client/build-tools/update:105:27)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47
node:child_process:905
    throw err;
    ^

Error: Command failed: node ./build-tools/update full
    at checkExecSyncError (node:child_process:828:11)
    at execSync (node:child_process:902:15)
    at Object.<anonymous> (/Users/annika/pokemon-showdown-client/build:70:1)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 1222,
  stdout: null,
  stderr: null
}

Do we know what's going on here?

@aviettran
Copy link
Contributor Author

I wonder if a transient dependency botched this. #1970

@urkerab
Copy link
Contributor

urkerab commented May 4, 2022

If I've understood the history correctly, it looks to be the switch from babel-cli to babel-core; the custom version of babel-cli obviously had its own dependency on source-map but when it was integrated into the build the source-map dependency got lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants