Open pi0 opened 2 months ago
"Today bug". Yesterday my script working perfectly fine.
Today, with this:
const storage = createStorage({
driver: fsDriver({ base: "./" }),
});
const packages = await storage.getKeys();
I got:
file:///home/oritwoen/Projekty/Archex/node_modules/.pnpm/unstorage@1.11.1/node_modules/unstorage/drivers/utils/node-fs.mjs:39
entries.map(async (entry) => {
^
TypeError: entries.map is not a function
at readdirRecursive (file:///home/oritwoen/Projekty/Archex/node_modules/.pnpm/unstorage@1.11.1/node_modules/unstorage/drivers/utils/node-fs.mjs:39:13)
at async file:///home/oritwoen/Projekty/Archex/node_modules/.pnpm/unstorage@1.11.1/node_modules/unstorage/drivers/utils/node-fs.mjs:42:26
at async Promise.all (index 2)
at async readdirRecursive (file:///home/oritwoen/Projekty/Archex/node_modules/.pnpm/unstorage@1.11.1/node_modules/unstorage/drivers/utils/node-fs.mjs:38:3)
at async file:///home/oritwoen/Projekty/Archex/node_modules/.pnpm/unstorage@1.11.1/node_modules/unstorage/drivers/utils/node-fs.mjs:42:26
at async Promise.all (index 43)
at async readdirRecursive (file:///home/oritwoen/Projekty/Archex/node_modules/.pnpm/unstorage@1.11.1/node_modules/unstorage/drivers/utils/node-fs.mjs:38:3)
at async Object.getKeys (file:///home/oritwoen/Projekty/Archex/node_modules/.pnpm/unstorage@1.11.1/node_modules/unstorage/dist/index.mjs:314:25)
at async file:///home/oritwoen/Projekty/Archex/build.mjs:10:18
@oritwoen i'm not sure it is the same issue... And also this stackblitz works with latest version.
If you could make a reproduction, please open a new issue 🙏🏼
Environment
-
Reproduction
Mount a driver within
node_modules
path.Describe the bug
https://github.com/unjs/unstorage/blob/0e2ea339a65995c9ef1e2130a293f0928a2c9de1/src/drivers/fs.ts#L32
Additional context
No response
Logs
No response