Skip to content

error: Unhandled Rejection at: Promise[object Promise] reason:Error: EISDIR: illegal operation on a directory, read #118

@engelchrisi

Description

@engelchrisi

In case there is a folder in the same directory as the cache file, then this folder is accessed as a file which lead to the ugly error above.
Easy workaround: put all cache files into their own folder.

This happens when the cleanup function is triggered.

readFile (node_modules\node-persist\src\local-storage.js:302)
fs.readdir (node_modules\node-persist\src\local-storage.js:286)
[ async function ] (Unknown Source:undefined)
fs.readdir (node_modules\node-persist\src\local-storage.js:278)
(anonymous function) (fs.js:135)
[ FSREQWRAP ] (Unknown Source:undefined)
init (inspector_async_hook.js:22)
emitInitNative (async_hooks.js:131)
fs.readdir (fs.js:897)
fs.exists (node_modules\node-persist\src\local-storage.js:278)
cb (fs.js:312)
[ FSREQWRAP ] (Unknown Source:undefined)
init (inspector_async_hook.js:22)
emitInitNative (async_hooks.js:131)
fs.exists (fs.js:310)
Promise (node_modules\node-persist\src\local-storage.js:275)
readDirectory (node_modules\node-persist\src\local-storage.js:273)
data (node_modules\node-persist\src\local-storage.js:116)
keys (node_modules\node-persist\src\local-storage.js:120)
removeExpiredItems (node_modules\node-persist\src\local-storage.js:238)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions