smogon / pokemon-showdown

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

Provide gpu.js #9314

Closed WesselvanGils closed 1 year ago

WesselvanGils commented 1 year ago

When installing the pokemon-showdown package with

yarn add pokemon-showdown yarn

it creates the following erros:

➤ YN0000: ┌ Resolution step
➤ YN0002: │ pokemon-showdown@npm:0.11.7 doesn't provide gpu.js (pa4621), requested by brain.js
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: Done with warnings in 0s 192ms

When running the explain peer requirements command it results in:

➤ YN0000: pokemon-showdown@npm:0.11.7 doesn't provide gpu.js, breaking the following requirements:

➤ YN0000: brain.js@npm:2.0.0-beta.18 [620ce] → ^2.16.0 ✘

From what I could gather online, this has to be solved by the developers of the package.

mia-pi-git commented 1 year ago

We no longer use that dependency, and haven't in quite some time (the NPM package was last updated in 2021). Unfortunately, we are unable to update the package at this time, so I would recommend running npm install on the repository URL (you'll get a much more up to date installation without this issue).

WesselvanGils commented 1 year ago

NPM installs seem to work fine, however I am using yarn. I tried installing from the repository with the latest commit. This however seems to have a different failing point for some reason.

# This file contains the result of Yarn building a package (pokemon-showdown@https://github.com/smogon/pokemon-showdown.git#commit=ba6fdee2608e7b06bbd13beb2cc11f8730763314)
# Script name: postinstall

> pokemon-showdown@0.11.7 build
> node build

config.js does not exist. Creating one with default settings...
node:fs:584
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open 'config/config-example.js'
    at Object.openSync (node:fs:584:3)
    at NodeFS.openSync (\Documents\Documents\Coding\pokemon-project\.pnp.cjs:4242:24)
    at makeCallSync.subPath.subPath (\Documents\Documents\Coding\pokemon-project\.pnp.cjs:6298:26)
    at ZipOpenFS.makeCallSync (\Documents\Documents\Coding\pokemon-project\.pnp.cjs:6929:14)
    at ZipOpenFS.openSync (\Documents\Documents\Coding\pokemon-project\.pnp.cjs:6297:17)
    at VirtualFS.openSync (\Documents\Documents\Coding\pokemon-project\.pnp.cjs:5885:24)
    at PosixFS.openSync (\Documents\Documents\Coding\pokemon-project\.pnp.cjs:5885:24)
    at NodePathFS.openSync (\Documents\Documents\Coding\pokemon-project\.pnp.cjs:5885:24)
    at Object.readFileSync (node:fs:452:35)
    at NodeFS.readFileSync (\Documents\Documents\Coding\pokemon-project\.pnp.cjs:4537:24) {
  errno: -4058,
  syscall: 'open',
  code: 'ENOENT',
  path: 'config/config-example.js'
}

Node.js v19.3.0

I am unsure as to why it states version 0.11.7 when building from the latest commit though.