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

Pinned packages needed to build screeps node packages #34

Open
shanemadden opened this issue Jun 22, 2023 · 8 comments
Open

Pinned packages needed to build screeps node packages #34

shanemadden opened this issue Jun 22, 2023 · 8 comments

Comments

@shanemadden
Copy link
Contributor

shanemadden commented Jun 22, 2023

Currently, pinnedPackages configuration is needed to get the screeps packages built successfully by launcher, due to upstream packages releasing versions that break compatibility with node 12.

Creating this issue as a place to collect the needed pins and add to it as necessary.

Known necessary pins so far (see #33)

pinnedPackages:
  ssri: 8.0.1
  cacache: 16.1.3
  passport-steam: 1.0.17
  minipass-fetch: 3.0.3
@ewrt101
Copy link

ewrt101 commented Jul 22, 2023

while running under windows without docker I needed to add node-gyp: 9.4.0 as a pinnedPackages to get a successful build

@bdomars
Copy link

bdomars commented Aug 15, 2023

Something else seems to be breaking it again, I have the listed pinnedPackages and still run into a build error.

# 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 [email protected]
gyp info using [email protected] | 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/minipass/dist/cjs/index.js:286
gyp ERR! stack         this.emit('abort', this[SIGNAL]?.reason);
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/minipass-fetch/lib/index.js:6:22)
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 6.4.9-200.fc38.x86_64
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.

Tried to just pin minipass to an earlier version but seems it is a dependency in some other package that still pulls in the latest version of minipass which breaks the build. Maybe? I'm not familiar enough with npm to keep digging.

@TuEye
Copy link

TuEye commented Aug 20, 2023

I was successful with the following pinnedPackages:

pinnedPackages:
  ssri: 9.0.1
  cacache: 16.1.3
  minipass: 4.2.8
  tar: 5.0.11
  minipass-fetch: 2.1.2
  make-fetch-happen: 10.2.1

@msconstante
Copy link

msconstante commented Sep 5, 2023

If I add to config.yml:

pinnedPackages:
  ssri: 9.0.1
  cacache: 16.1.3
  minipass: 4.2.8
  tar: 5.0.11
  minipass-fetch: 2.1.2
  make-fetch-happen: 10.2.1

It seems to successfully build isolated-vm, but now I get the error:
2023/09/05 17:52:15 Exec: yarn ➤ YN0000: ┌ Resolution step ➤ YN0000: └ Completed ➤ YN0000: ┌ Fetch step ➤ YN0000: └ Completed in 0s 483ms ➤ YN0000: ┌ Link step ➤ YN0007: │ @screeps/driver@npm:5.2.1 must be built because it never has been before or the last one failed ➤ YN0009: │ @screeps/driver@npm:5.2.1 couldn't be built successfully (exit code 7, logs can be found here: /tmp/xfs-dea2d0b9/build.log) ➤ YN0000: └ Completed in 0s 940ms ➤ YN0000: Failed with errors in 1s 683ms 2023/09/05 17:52:18 exit status 1

I am using the docker-compose.yml and instructions as found in the github website on a Debian12 container under proxmox.

EDIT: Everything seems to compile if I use the first suggestion:

pinnedPackages:
  ssri: 8.0.1
  cacache: 16.1.3
  passport-steam: 1.0.17
  minipass-fetch: 3.0.3

kalgen432 added a commit to kalgen432/screeps-launcher that referenced this issue Sep 13, 2023
Update config.sample.yml with pinnedPackages and include breadcrumbs pointing at ways to fix if they change in the future: screepers#34
AlinaNova21 pushed a commit that referenced this issue Sep 13, 2023
Update config.sample.yml with pinnedPackages and include breadcrumbs pointing at ways to fix if they change in the future: #34
@kalgen432
Copy link
Contributor

Some direct dependencies seem to have been pushed with new requirements of their own dependencies, even though versions of the directs didn't change. That resulted in cacache 16.1.3 requiring ssri 9.0.0. And some others started requiring node >= 14. Strange. The following worked for me if anyone is up for reproducing and confirming?

pinnedPackages:
  ssri: 8.0.1
  cacache: 15.3.0
  passport-steam: 1.0.17
  minipass-fetch: 2.1.2
  express-rate-limit: 6.7.0

@jsProj
Copy link

jsProj commented Nov 16, 2023

Something else seems to be breaking it again, I have the listed pinnedPackages and still run into a build error.

# 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 [email protected]
gyp info using [email protected] | 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/minipass/dist/cjs/index.js:286
gyp ERR! stack         this.emit('abort', this[SIGNAL]?.reason);
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/minipass-fetch/lib/index.js:6:22)
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 6.4.9-200.fc38.x86_64
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.

Tried to just pin minipass to an earlier version but seems it is a dependency in some other package that still pulls in the latest version of minipass which breaks the build. Maybe? I'm not familiar enough with npm to keep digging.

thats node requiring v14.17.0 for the optional chaining operator, so maybe a slightly earlier version of minipass is needed? Any way to make sure it pulls an earlier version?

@martydingo
Copy link

martydingo commented Nov 30, 2023

There has been a code change in @screeps/engine^4.2.18 that tries to import a non-existent @screeps/core

I've now gotten past this error by configuring

pinnedPackages:
  - '@screeps/engine^4.2.16'
... 

@shanemadden
Copy link
Contributor Author

There has been a code change in @screeps/engine^4.2.18 that tries to import a non-existent @screeps/core

I've now gotten past this error by configuring

pinnedPackages:
  - '@screeps/engine^4.2.16'
... 

New version of [email protected] has been released that fixes this particular problem

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

No branches or pull requests

8 participants