cRz-Shadows / Pokemon_Trainer_Tournament_Simulator

Here we have an environment for running large amounts of Pokémon battle simulations in the command line.
71 stars 4 forks source link

Getting issues when trying to run npm install pokemon-showdown #2

Closed E-Meister2012 closed 3 months ago

E-Meister2012 commented 8 months ago

I'm trying to install the bot to run my own tournament, but when I try to use npm install pokemon-showdown, I'm getting some warnings and errors, are these known? Are there fixes? Info: NPM version: 10.3.0 node version: 21.6.0 python version: 3.12.1 anaconda version: 23.7.4 I've followed everything in the tutorial, and there were no errors there

All instances of PATH is just the path to the github clone Warinings + errors:

npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'PATH\\Pokemon_Trainer_Tournament_Simulator\\pokemon-showdown\\node_modules\\pokemon-showdown',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'PATH\ShowdownBot\Pokemon_Trainer_Tournament_Simulator\pokemon-showdown\node_modules\pokemon-showdown'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'PATH\\ShowdownBot\\Pokemon_Trainer_Tournament_Simulator\\pokemon-showdown\\node_modules\\pokemon-showdown'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'PATH\\ShowdownBot\\Pokemon_Trainer_Tournament_Simulator\\pokemon-showdown\\node_modules\\pokemon-showdown',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'PATH\ShowdownBot\Pokemon_Trainer_Tournament_Simulator\pokemon-showdown\node_modules\pokemon-showdown'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'PATH\\ShowdownBot\\Pokemon_Trainer_Tournament_Simulator\\pokemon-showdown\\node_modules\\pokemon-showdown'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path PATH\ShowdownBot\Pokemon_Trainer_Tournament_Simulator\pokemon-showdown\node_modules\esbuild
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js
npm ERR! PATH\ShowdownBot\Pokemon_Trainer_Tournament_Simulator\pokemon-showdown\node_modules\esbuild\install.js:130
npm ERR!     throw new Error(`Expected ${JSON.stringify("0.16.15")} but got ${JSON.stringify(stdout)}`);
npm ERR!           ^
npm ERR!
npm ERR! Error: Expected "0.16.15" but got "0.16.17"
npm ERR!     at validateBinaryVersion (PATH\ShowdownBot\Pokemon_Trainer_Tournament_Simulator\pokemon-showdown\node_modules\esbuild\install.js:130:11)       
npm ERR!     at PATH\ShowdownBot\Pokemon_Trainer_Tournament_Simulator\pokemon-showdown\node_modules\esbuild\install.js:277:5
npm ERR!
npm ERR! Node.js v21.6.0
cRz-Shadows commented 8 months ago

Expected "0.16.15" but got "0.16.17" so there's a version mismatch in the esbuild package. Your node and npm versions are significantly newer than the ones it was initially built with in the repo, it's possible newer versions have broken things. You'll need to move to an older version of that package, or npm in general it seems.