R
Railway15mo ago
snieking

ERROR: failed to solve: process "/bin/bash -ol pipefail -c pnpm i --frozen-lockfile" did not complet

My servers has started failing their builds lately and I haven't been able to figure out why yet. Building locally works perfectly fine. I tried to also a pnpm store prune into my build command without any success. I am using Nixpacks.
Solution:
try setting engines.node to 18 in your package.json
Jump to solution
16 Replies
Percy
Percy15mo ago
Project ID: 3ba1c704-e8b3-4cf3-9314-29c91a5957c0
snieking
sniekingOP15mo ago
3ba1c704-e8b3-4cf3-9314-29c91a5957c0 The logs are spammed with the following for both of my failing services:
72.52  WARN  GET https://registry.npmjs.org/@apollo/utils.fetcher/-/utils.fetcher-2.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/@apollo/utils.keyvaluecache/-/utils.keyvaluecache-2.1.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/@apollo/utils.logger/-/utils.logger-2.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/@apollo/utils.createhash/-/utils.createhash-2.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/@apollo/utils.isnodelike/-/utils.isnodelike-2.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/@apollo/utils.dropunuseddefinitions/-/utils.dropunuseddefinitions-2.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
72.52  WARN  GET https://registry.npmjs.org/@apollo/utils.fetcher/-/utils.fetcher-2.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/@apollo/utils.keyvaluecache/-/utils.keyvaluecache-2.1.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/@apollo/utils.logger/-/utils.logger-2.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/@apollo/utils.createhash/-/utils.createhash-2.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/@apollo/utils.isnodelike/-/utils.isnodelike-2.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.

72.52  WARN  GET https://registry.npmjs.org/@apollo/utils.dropunuseddefinitions/-/utils.dropunuseddefinitions-2.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
It worked fine before and I can't recall anything that I've changed that could have affected this.
Solution
Brody
Brody15mo ago
try setting engines.node to 18 in your package.json
snieking
sniekingOP15mo ago
Same issue unfortunately
Brody
Brody15mo ago
show me the build table at the top of the build logs please
snieking
sniekingOP15mo ago
╔══════════════════════════════ Nixpacks v1.16.0 ══════════════════════════════╗

║ setup │ nodejs_20, pnpm-8_x ║

║──────────────────────────────────────────────────────────────────────────────║

║ install │ npm install -g corepack && corepack enable ║

║ │ pnpm i --frozen-lockfile ║

║──────────────────────────────────────────────────────────────────────────────║

║ build │ pnpm --version && rm -rf **/**/node_modules && pnpm i && pnpm ║

║ │ build:libs ║

║──────────────────────────────────────────────────────────────────────────────║

║ start │ pnpm start:chr-listener ║

╚══════════════════════════════════════════════════════════════════════════════╝
╔══════════════════════════════ Nixpacks v1.16.0 ══════════════════════════════╗

║ setup │ nodejs_20, pnpm-8_x ║

║──────────────────────────────────────────────────────────────────────────────║

║ install │ npm install -g corepack && corepack enable ║

║ │ pnpm i --frozen-lockfile ║

║──────────────────────────────────────────────────────────────────────────────║

║ build │ pnpm --version && rm -rf **/**/node_modules && pnpm i && pnpm ║

║ │ build:libs ║

║──────────────────────────────────────────────────────────────────────────────║

║ start │ pnpm start:chr-listener ║

╚══════════════════════════════════════════════════════════════════════════════╝
Brody
Brody15mo ago
its still using node 20, can you show me how you set engines.node also im not sure why you need to do rm -rf on the node_modules folder, that folder should never make it into your repo in the first place
snieking
sniekingOP15mo ago
yea that was just me playing and debugging ah I had ^18, now I received 18 new build in progress
Brody
Brody15mo ago
^
snieking
sniekingOP15mo ago
Is there some issue with Nixpacks and node 20? worked btw when I set it to 18, thanks.
AdamantiumHands
AdamantiumHands15mo ago
I get this often too
Brody
Brody15mo ago
no, just pnpm probably isn't compatible with node 20 and if you do something like ">=16.0.0" well node 20 is greater than 16 so nixpacks using node 20 is normal, so you should always be pinning your project to a spoecfic version of node
snieking
sniekingOP15mo ago
gotcha, makes sense time to start considering bun perhaps
Brody
Brody15mo ago
i will say if you decide to use bun, you have to fully commit, no mixing bun and pnpm, etc
snieking
sniekingOP15mo ago
yea, would be a bigger project to convert my monorepo to that. anyways, makred this as solved. Thanks for the quick assistance
Brody
Brody15mo ago
no problem 🙂
Want results from more Discord servers?
Add your server