R
Railway14mo 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
Percy14mo ago
Project ID: 3ba1c704-e8b3-4cf3-9314-29c91a5957c0
snieking
snieking14mo 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
Brody14mo ago
try setting engines.node to 18 in your package.json
snieking
snieking14mo ago
Same issue unfortunately
Brody
Brody14mo ago
show me the build table at the top of the build logs please
snieking
snieking14mo 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
Brody14mo 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
snieking14mo ago
yea that was just me playing and debugging ah I had ^18, now I received 18 new build in progress
Brody
Brody14mo ago
^
snieking
snieking14mo ago
Is there some issue with Nixpacks and node 20? worked btw when I set it to 18, thanks.
AdamantiumHands
AdamantiumHands14mo ago
I get this often too
Brody
Brody14mo 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
snieking14mo ago
gotcha, makes sense time to start considering bun perhaps
Brody
Brody14mo ago
i will say if you decide to use bun, you have to fully commit, no mixing bun and pnpm, etc
snieking
snieking14mo ago
yea, would be a bigger project to convert my monorepo to that. anyways, makred this as solved. Thanks for the quick assistance
Brody
Brody14mo ago
no problem 🙂
Want results from more Discord servers?
Add your server