initiative-sh/initiative.sh

Cloudflare build fails

Closed this issue · 0 comments

Cloudflare is failing to build previews with the following error. The failing command is npm install -g wasm-pack, which might be some sort of version incompatibility error. The build doesn't progress as far as directly interacting with the code base, so it's probably not a logic issue.

2023-09-16T03:59:19.722561Z	Cloning repository...
2023-09-16T03:59:20.626445Z	From https://github.com/initiative-sh/initiative.sh
2023-09-16T03:59:20.627053Z	 * branch            69cc360aa9309ae4f54e681fdcfb1c2feafe6664 -> FETCH_HEAD
2023-09-16T03:59:20.627231Z	
2023-09-16T03:59:20.741763Z	HEAD is now at 69cc360 Clippy: "use of `default` to create a unit struct"
2023-09-16T03:59:20.742381Z	
2023-09-16T03:59:21.839587Z	Submodule '5e-database' (git@github.com:initiative-sh/5e-database.git) registered for path 'data/srd_5e'
2023-09-16T03:59:21.840226Z	Cloning into '/opt/buildhome/clone/data/srd_5e'...
2023-09-16T03:59:21.840406Z	Submodule path 'data/srd_5e': checked out 'd56743f7583f01611eb9c9584df73cb45086b590'
2023-09-16T03:59:21.840537Z	
2023-09-16T03:59:21.869913Z	Success: Finished cloning repository files
2023-09-16T03:59:22.740829Z	Installing dependencies
2023-09-16T03:59:22.748247Z	Python version set to 2.7
2023-09-16T03:59:25.466743Z	v12.18.0 is already installed.
2023-09-16T03:59:26.576414Z	Now using node v12.18.0 (npm v6.14.4)
2023-09-16T03:59:26.742402Z	Started restoring cached build plugins
2023-09-16T03:59:26.752986Z	Finished restoring cached build plugins
2023-09-16T03:59:27.120951Z	Attempting ruby version 2.7.1, read from environment
2023-09-16T03:59:28.474225Z	Using /opt/buildhome/.rvm/gems/ruby-2.7.1
2023-09-16T03:59:29.40296Z	Using PHP version 5.6
2023-09-16T03:59:29.489499Z	5.2.5 is already installed.
2023-09-16T03:59:29.505672Z	Using Swift version 5.2.5
2023-09-16T03:59:29.505938Z	Installing Hugo 0.54.0
2023-09-16T03:59:30.374106Z	Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
2023-09-16T03:59:30.377299Z	Started restoring cached go cache
2023-09-16T03:59:30.389733Z	Finished restoring cached go cache
2023-09-16T03:59:30.471843Z	go version go1.14.4 linux/amd64
2023-09-16T03:59:30.484043Z	go version go1.14.4 linux/amd64
2023-09-16T03:59:30.487315Z	Installing missing commands
2023-09-16T03:59:30.487525Z	Verify run directory
2023-09-16T03:59:30.487653Z	Executing user command: ./build.sh
2023-09-16T03:59:30.497439Z	+++ readlink -m ./build.sh
2023-09-16T03:59:30.499904Z	++ dirname /opt/buildhome/repo/build.sh
2023-09-16T03:59:30.502137Z	+ project_root=/opt/buildhome/repo
2023-09-16T03:59:30.502329Z	+ command -v rustup
2023-09-16T03:59:30.504417Z	+ wget https://sh.rustup.rs -O rustup.sh
2023-09-16T03:59:30.516396Z	--2023-09-16 03:59:30--  https://sh.rustup.rs/
2023-09-16T03:59:30.640429Z	Resolving sh.rustup.rs (sh.rustup.rs)... 108.138.94.24, 108.138.94.91, 108.138.94.112, ...
2023-09-16T03:59:30.646848Z	Connecting to sh.rustup.rs (sh.rustup.rs)|108.138.94.24|:443... connected.
2023-09-16T03:59:30.672151Z	HTTP request sent, awaiting response... 200 OK
2023-09-16T03:59:30.672367Z	Length: 23159 (23K) [application/x-sh]
2023-09-16T03:59:30.672532Z	Saving to: ‘rustup.sh’
2023-09-16T03:59:30.672727Z	
2023-09-16T03:59:30.672968Z	     0K .......... .......... ..                              100% 81.5M=0s
2023-09-16T03:59:30.673117Z	
2023-09-16T03:59:30.673249Z	2023-09-16 03:59:30 (81.5 MB/s) - ‘rustup.sh’ saved [23159/23159]
2023-09-16T03:59:30.673374Z	
2023-09-16T03:59:30.674147Z	+ chmod a+x rustup.sh
2023-09-16T03:59:30.679461Z	+ ./rustup.sh -y --target wasm32-unknown-unknown --profile minimal
2023-09-16T03:59:30.714641Z	info: downloading installer
2023-09-16T03:59:31.312636Z	info: profile set to 'minimal'
2023-09-16T03:59:31.313272Z	info: default host triple is x86_64-unknown-linux-gnu
2023-09-16T03:59:31.313482Z	info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
2023-09-16T03:59:31.497538Z	info: latest update on 2023-08-24, rust version 1.72.0 (5680fa18f 2023-08-23)
2023-09-16T03:59:31.497928Z	info: downloading component 'cargo'
2023-09-16T03:59:31.584483Z	info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
2023-09-16T03:59:31.75683Z	info: downloading component 'rust-std'
2023-09-16T03:59:32.020981Z	info: downloading component 'rustc'
2023-09-16T03:59:32.72224Z	info: installing component 'cargo'
2023-09-16T03:59:33.584088Z	info: installing component 'rust-std' for 'wasm32-unknown-unknown'
2023-09-16T03:59:35.267833Z	info: installing component 'rust-std'
2023-09-16T03:59:37.857536Z	info: installing component 'rustc'
2023-09-16T03:59:43.529481Z	info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'
2023-09-16T03:59:43.529846Z	
2023-09-16T03:59:43.554029Z	  stable-x86_64-unknown-linux-gnu installed - rustc 1.72.0 (5680fa18f 2023-08-23)
2023-09-16T03:59:43.554309Z	
2023-09-16T03:59:43.554489Z	
2023-09-16T03:59:43.554662Z	Rust is installed now. Great!
2023-09-16T03:59:43.554813Z	
2023-09-16T03:59:43.554952Z	To get started you may need to restart your current shell.
2023-09-16T03:59:43.555081Z	This would reload your PATH environment variable to include
2023-09-16T03:59:43.555206Z	Cargo's bin directory ($HOME/.cargo/bin).
2023-09-16T03:59:43.555325Z	
2023-09-16T03:59:43.555502Z	To configure your current shell, run:
2023-09-16T03:59:43.555647Z	source "$HOME/.cargo/env"
2023-09-16T03:59:43.567132Z	+ rm rustup.sh
2023-09-16T03:59:43.570025Z	+ source /opt/buildhome/.cargo/env
2023-09-16T03:59:43.570406Z	++ case ":${PATH}:" in
2023-09-16T03:59:43.570632Z	++ export PATH=/opt/buildhome/.cargo/bin:/opt/buildhome/.wasmer/bin:/opt/buildhome/.gimme/versions/go1.14.4.linux.amd64/bin:/opt/buildhome/cache/.binrc-a5679f71f5966d1b3450c8dcd52d4743ec08e632/binaries/gohugoio/hugo/v0.54.0:/opt/buildhome/.rvm/gems/ruby-2.7.1/bin:/opt/buildhome/.rvm/gems/ruby-2.7.1@global/bin:/opt/buildhome/.rvm/rubies/ruby-2.7.1/bin:/opt/buildhome/.rvm/bin:/opt/buildhome/.nvm/versions/node/v12.18.0/bin:/opt/buildhome/python2.7/bin:/opt/buildhome/.asdf/shims:/opt/buildhome/.asdf/bin:/opt/buildhome/.swiftenv/bin:/opt/buildhome/.swiftenv/shims:/opt/buildhome/.php:/opt/buildhome/.binrc/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/buildhome/.cask/bin:/opt/buildhome/.gimme/bin:/opt/buildhome/.dotnet/tools:/opt/buildhome/.dotnet:/opt/buildhome/.local/bin
2023-09-16T03:59:43.570901Z	++ PATH=/opt/buildhome/.cargo/bin:/opt/buildhome/.wasmer/bin:/opt/buildhome/.gimme/versions/go1.14.4.linux.amd64/bin:/opt/buildhome/cache/.binrc-a5679f71f5966d1b3450c8dcd52d4743ec08e632/binaries/gohugoio/hugo/v0.54.0:/opt/buildhome/.rvm/gems/ruby-2.7.1/bin:/opt/buildhome/.rvm/gems/ruby-2.7.1@global/bin:/opt/buildhome/.rvm/rubies/ruby-2.7.1/bin:/opt/buildhome/.rvm/bin:/opt/buildhome/.nvm/versions/node/v12.18.0/bin:/opt/buildhome/python2.7/bin:/opt/buildhome/.asdf/shims:/opt/buildhome/.asdf/bin:/opt/buildhome/.swiftenv/bin:/opt/buildhome/.swiftenv/shims:/opt/buildhome/.php:/opt/buildhome/.binrc/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/buildhome/.cask/bin:/opt/buildhome/.gimme/bin:/opt/buildhome/.dotnet/tools:/opt/buildhome/.dotnet:/opt/buildhome/.local/bin
2023-09-16T03:59:43.571068Z	+ command -v wasm-pack
2023-09-16T03:59:43.57285Z	+ npm install -g wasm-pack
2023-09-16T03:59:45.9212Z	/opt/buildhome/.nvm/versions/node/v12.18.0/bin/wasm-pack -> /opt/buildhome/.nvm/versions/node/v12.18.0/lib/node_modules/wasm-pack/run.js
2023-09-16T03:59:45.935887Z	
2023-09-16T03:59:45.93615Z	> wasm-pack@0.12.1 postinstall /opt/buildhome/.nvm/versions/node/v12.18.0/lib/node_modules/wasm-pack
2023-09-16T03:59:45.936297Z	> node ./install.js
2023-09-16T03:59:45.93642Z	
2023-09-16T03:59:46.012503Z	/opt/buildhome/.nvm/versions/node/v12.18.0/lib/node_modules/wasm-pack/node_modules/binary-install/index.js:46
2023-09-16T03:59:46.012785Z	      config?.installDirectory || join(__dirname, "node_modules", ".bin");
2023-09-16T03:59:46.013046Z	             ^
2023-09-16T03:59:46.013195Z	
2023-09-16T03:59:46.01331Z	SyntaxError: Unexpected token '.'
2023-09-16T03:59:46.013422Z	    at wrapSafe (internal/modules/cjs/loader.js:1054:16)
2023-09-16T03:59:46.013538Z	    at Module._compile (internal/modules/cjs/loader.js:1102:27)
2023-09-16T03:59:46.013653Z	    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
2023-09-16T03:59:46.013765Z	    at Module.load (internal/modules/cjs/loader.js:986:32)
2023-09-16T03:59:46.013889Z	    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
2023-09-16T03:59:46.014003Z	    at Module.require (internal/modules/cjs/loader.js:1026:19)
2023-09-16T03:59:46.014124Z	    at require (internal/modules/cjs/helpers.js:72:18)
2023-09-16T03:59:46.014256Z	    at Object.<anonymous> (/opt/buildhome/.nvm/versions/node/v12.18.0/lib/node_modules/wasm-pack/binary.js:1:20)
2023-09-16T03:59:46.014387Z	    at Module._compile (internal/modules/cjs/loader.js:1138:30)
2023-09-16T03:59:46.014507Z	    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
2023-09-16T03:59:46.074525Z	npm ERR! code ELIFECYCLE
2023-09-16T03:59:46.074829Z	npm ERR! errno 1
2023-09-16T03:59:46.075512Z	npm ERR! wasm-pack@0.12.1 postinstall: `node ./install.js`
2023-09-16T03:59:46.075773Z	npm ERR! Exit status 1
2023-09-16T03:59:46.075931Z	npm ERR! 
2023-09-16T03:59:46.076079Z	npm ERR! Failed at the wasm-pack@0.12.1 postinstall script.
2023-09-16T03:59:46.076197Z	npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2023-09-16T03:59:46.082551Z	
2023-09-16T03:59:46.082771Z	npm ERR! A complete log of this run can be found in:
2023-09-16T03:59:46.082945Z	npm ERR!     /opt/buildhome/.npm/_logs/2023-09-16T03_59_46_078Z-debug.log
2023-09-16T03:59:46.094669Z	Failed: build command exited with code: 1
2023-09-16T03:59:46.846135Z	Failed: error occurred while running build command