HasangerGames/suroi

"pnpm install" doesn't work

ersek-huba opened this issue · 9 comments

When I'm trying to install all the dependencies, via 'pnpm install', I get the following output:

Scope: all 5 workspace projects
Lockfile is up to date, resolution step is skipped
 WARN  Broken lockfile: no entry for 'uWebSockets.js@https://codeload.github.com/uNetworking/uWebSockets.js/tar.gz/105d9ec47126cb82e4a6f3a08aa2ac78b4bb14f1' in pnpm-lock.yaml
 ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY  The lockfile is broken! Resolution step will be performed to fix it.
server                                   |  WARN  Could not find preferred package uWebSockets.js@https://codeload.github.com/uNetworking/uWebSockets.js/tar.gz/105d9ec47126cb82e4a6f3a08aa2ac78b4bb14f1 in lockfile
Downloading pixi.js@8.0.5: 9.27 MB/9.27 MB, done
/mnt/server:
 ENOENT  Command failed with ENOENT: git ls-remote --refs https://github.com/uNetworking/uWebSockets.js.git v20.41.0
spawn git ENOENT

This error happened while installing a direct dependency of /mnt/server

pnpm: Command failed with ENOENT: git ls-remote --refs https://github.com/uNetworking/uWebSockets.js.git v20.41.0
spawn git ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Progress: resolved 39, reused 39, downloaded 0, added 0

How can I fix it? What can I do about it?

Try deleting the lockfile (pnpm-lock.yaml) and running pnpm install again.

Still doesn't work.

Scope: all 5 workspace projects
/mnt/server:
 ENOENT  Command failed with ENOENT: git ls-remote --refs https://github.com/uNetworking/uWebSockets.js.git v20.41.0
spawn git ENOENT

This error happened while installing a direct dependency of /mnt/server

pnpm: Command failed with ENOENT: git ls-remote --refs https://github.com/uNetworking/uWebSockets.js.git v20.41.0
spawn git ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Progress: resolved 41, reused 41, downloaded 0, added 0

Is your nodejs version v16? I see many crashes and bugs with later versions. Try running node v16 if you have a later version.

Is your nodejs version v16? I see many crashes and bugs with later versions. Try running node v16 if you have a later version.

Make sure to do pnpm install on a fresh download after reinstalling

Aaaaand... still doesn't work...

And even the project requires that Node.js should be at least version 18.8.0.

I've had issues with v18, so I thought I'd suggest v16.

I'm running v20.11.0 and haven't had any issues

Whatever, I solved it.