PNPM suddenly failing to install packages on startup


#1

One of my projects has started throwing errors when it tries to start. From the in-editor logs:

node v8.11.1, with pnpm
12:19 PM
Installing...
12:19 PM
Packages: +180
12:19 PM
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12:19 PM
 ERROR  Command failed: cp -r --reflink /rbd/pnpm-volume/store/2/registry.npmjs.org/depd/1.1.2/node_modules/depd/. /rbd/pnpm-volume/f22cb9ff-609c-4137-8138-9f6a65bc424a/node_modules/.registry.npmjs.org/depd/1.1.2/node_modules/_tmp_26581_2c3464138d2919c6ae33c538f94090f6
12:19 PM
cp: cannot stat '/rbd/pnpm-volume/store/2/registry.npmjs.org/depd/1.1.2/node_modules/depd/.': No such file or directory

If I hop into Console and run pnpm install from within /app, I get the same error:

$ pnpm install
A store server is running. All store manipulations are delegated to it.
 WARN  using --shamefully-flatten is discouraged, you should declare all of your dependencies in package.json
Packages: +180
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ERROR  Command failed: cp -r --reflink /rbd/pnpm-volume/store/2/registry.npmjs.org/depd/1.1.2/node_modules/depd/. /rbd/pnpm-volume/f22cb
9ff-609c-4137-8138-9f6a65bc424a/node_modules/.registry.npmjs.org/depd/1.1.2/node_modules/_tmp_26581_ce839074466bff1ebc993249523c1f3e
cp: cannot stat '/rbd/pnpm-volume/store/2/registry.npmjs.org/depd/1.1.2/node_modules/depd/.': No such file or directory

A quick check confirms that path is, in fact, invalid:

$ ls -la /rbd/pnpm-volume/store/2/
total 16
drwxr-xr-x 1 app    app     4096 May  7 18:24 .
drwxr-xr-x 1 app    app     4096 May  4 15:00 ..
drwxr-xr-x 2 app    app     4096 May  7 19:23 _locks
-rw-r--r-- 1 nobody nogroup  111 Apr 26 20:21 server.json
srwxr-xr-x 1 app    nogroup    0 Apr 26 20:21 socket

I was working in this project earlier today without any issue and though I’m not 100% certain, I don’t think I touched anything that would cause deployment to fail. Rewinding to earlier commits doesn’t resolve this symptom, which leads me to suspect something environmental has changed.

I’d appreciate any help or pointers in getting this creaky little experiment back up and running. Thanks! :pray:


#2

I missed this issue searching for my specific error message, but the resolution is the same — switching from pnpm to npm with enable-npm seems to have cleared things up.