node-proper-lockfile icon indicating copy to clipboard operation
node-proper-lockfile copied to clipboard

Cannot read property 'updateTimeout' of undefined

Open Rinse12 opened this issue 3 years ago • 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.

Rinse12 avatar Jan 18 '23 09:01 Rinse12

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

Rinse12 avatar Jan 21 '23 15:01 Rinse12