screepers / screeps-launcher

Launcher for the Screeps Private Server
MIT License
129 stars 34 forks source link

isolated-vm fails to install #35

Closed gtrcoi closed 12 months ago

gtrcoi commented 12 months ago

isolated-vm fails on docker run, including with docker run --restart=unless-stopped --memory=4g --memory-swap=8g --name MyScreepsServer -v ${PWD}:/screeps -p 21025:21025 screepers/screeps-launcher. --memory and --memory-swap were added to as a potential fix mentioned here https://github.com/screepers/screeps-launcher/issues/6, but no luck. Also fails running without port exposure, directory sharing, and through the docker GUI.

Log file for isolated-vm@npm:2.1.1:

# This file contains the result of Yarn building a package (isolated-vm@npm:2.1.1)
# Script name: install

gyp info it worked if it ends with ok
gyp info using node-gyp@9.4.0
gyp info using node@12.22.12 | linux | x64
gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack /screeps/node_modules/ssri/lib/index.js:16
gyp ERR! stack const getOptString = options => options?.length ? `?${options.join('?')}` : ''
gyp ERR! stack                                         ^
gyp ERR! stack 
gyp ERR! stack SyntaxError: Unexpected token '.'
gyp ERR! stack     at wrapSafe (internal/modules/cjs/loader.js:915:16)
gyp ERR! stack     at Module._compile (internal/modules/cjs/loader.js:963:27)
gyp ERR! stack     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
gyp ERR! stack     at Module.load (internal/modules/cjs/loader.js:863:32)
gyp ERR! stack     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
gyp ERR! stack     at Module.require (internal/modules/cjs/loader.js:887:19)
gyp ERR! stack     at require (internal/modules/cjs/helpers.js:74:18)
gyp ERR! stack     at Object.<anonymous> (/screeps/node_modules/make-fetch-happen/lib/cache/policy.js:3:14)
gyp ERR! stack     at Module._compile (internal/modules/cjs/loader.js:999:30)
gyp ERR! stack     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
gyp ERR! System Linux 5.10.102.1-microsoft-standard-WSL2
gyp ERR! command "/screeps/deps/node/bin/node" "/screeps/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" "-j" "4"
gyp ERR! cwd /screeps/node_modules/isolated-vm
gyp ERR! node -v v12.22.12
gyp ERR! node-gyp -v v9.4.0
gyp ERR! Node-gyp failed to build your package.
gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.

@screeps/driver@npm:5.2.1 also fails but it looks like it depends on isolated-vm.

gtrcoi commented 12 months ago

https://github.com/npm/ssri/blob/main/lib/index.js ssri file mentioned in log

gtrcoi commented 12 months ago

adding pinnedPackages to config.yml described in https://github.com/screepers/screeps-launcher/issues/34 fixed issue