return this.listener.apply(this.target, arguments);

I'm suddenly getting this error in all my builds. I even Retried previous build that were successful (2 weeks ago) and they are all getting this error. I have no idea what's going on.
15 Replies
orangeboi
orangeboiOP4mo ago
21:49:07.766 node:events:652
21:49:07.766 return this.listener.apply(this.target, arguments);
21:49:07.766 ^
21:49:07.767
21:49:07.767 q [Error]: Error while executing user command. Exited with error code: 1
21:49:07.767 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
21:49:07.767 at Object.onceWrapper (node:events:652:26)
21:49:07.767 at ChildProcess.emit (node:events:537:28)
21:49:07.767 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
21:49:07.767
21:49:07.767 Node.js v18.5.0
21:49:07.924 Failed: build command exited with code: 1
21:49:09.681 Failed: error occurred while running build command
21:49:07.766 node:events:652
21:49:07.766 return this.listener.apply(this.target, arguments);
21:49:07.766 ^
21:49:07.767
21:49:07.767 q [Error]: Error while executing user command. Exited with error code: 1
21:49:07.767 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
21:49:07.767 at Object.onceWrapper (node:events:652:26)
21:49:07.767 at ChildProcess.emit (node:events:537:28)
21:49:07.767 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
21:49:07.767
21:49:07.767 Node.js v18.5.0
21:49:07.924 Failed: build command exited with code: 1
21:49:09.681 Failed: error occurred while running build command
the build log ends with this what's odd is that it says Node.js v18.5.0 which I know is old, but this came out of nowhere? my project doesn't say to use, nor does my cloudflare setup I've had the NODE_VERSION variable in my cloudfllare workers and page settings set to 20.11.1 for weeks now
Shihmin Lee
Shihmin Lee4mo ago
Same for me. all builds are failing now even when I specify NODE_VERSION = 20.10.0
orangeboi
orangeboiOP4mo ago
I have a fix
Shihmin Lee
Shihmin Lee4mo ago
The same thing that builds weeks ago suddenly cannot build anymore.
No description
Shihmin Lee
Shihmin Lee4mo ago
oh really?!
orangeboi
orangeboiOP4mo ago
it’ll work when you build locally with npm run build & npm run deploy vs pushing to your branch and having the GitHub cloudflare integration do the build
Shihmin Lee
Shihmin Lee4mo ago
Gotcha. I'll try to configure that locally I guess. I wonder what changed on Cloudflare Pages side though.
orangeboi
orangeboiOP4mo ago
do you use the builder qwik sdk by any chance? if you do it may have something to do with their latest version and isolated-vm
Shihmin Lee
Shihmin Lee4mo ago
gotcha. No I am not sure I haven't updated my qwik version for probably 6 months.
orangeboi
orangeboiOP4mo ago
ah gotcha
juanferreras
juanferreras3mo ago
out of curiosity - is the env a plaintext env? does converting it to secret and redeploying work? otherwise note you can set a .nvmrc or .node-version file with just 20.10.0 and that'll also work like the env
Shihmin Lee
Shihmin Lee3mo ago
I have specified NODE_ENV env and .node-version and .nvmrc all to 20.10.0 and the log suggests for some reason it's still trying to build with Node.js v18.5.0.
orangeboi
orangeboiOP3mo ago
figured out the issue, it's from qwik plus changes with how cloudflare handles build commands qwik build runs - npm run build.types - npm run build.client - npm run build.server - npm run lint if npm lint returns errors now that stops the node process which causes cloudflare to stop building
Shihmin Lee
Shihmin Lee3mo ago
So you're right. The framework does this
"build.types": "tsc --incremental --noEmit",
"build.types": "tsc --incremental --noEmit",
this throws errors but previously the Pages CI has no issue continuing with the deploy but it seems this behaviour changed maybe last week.
"build.types": "tsc --incremental --noEmit || exit 0",
"build.types": "tsc --incremental --noEmit || exit 0",
can get around this issue for me though
Upayan
Upayan3mo ago
I do. I have the exact same issue
Want results from more Discord servers?
Add your server