moxystudio/node-proper-lockfile

Cannot read property 'updateTimeout' of undefined

Rinse12 opened this issue · 1 comments

Ocasionally I get this error,

 Uncaught TypeError: Cannot read properties of undefined (reading 'updateTimeout')
    at updateLock (node_modules/proper-lockfile/lib/lockfile.js:104:14)
    at /home/user2/Nextcloud/projects/plebbit/plebbit-js/node_modules/proper-lockfile/lib/lockfile.js:167:17
    at FSReqCallback.oncomplete (node:fs:192:23)
    at FSReqCallback.callbackTrampoline (node:internal/async_hooks:130:17)

Seems like locks[file] is not defined by the time updateLock is called. Would love any insights on why.

To give some context, I have a single file and a three locks that I frequently lock and unlock