Readdir is not a function #4959
Replies: 1 comment
-
Hey there @carl-youngman! 🚀 I'm Dosu, your friendly neighborhood bot, here to help you squash bugs, answer your burning questions, and guide you on your journey to becoming a LangChain JS contributor. While we're waiting for a human maintainer, I'm here to lend you a hand. Let's tackle this together! Based on the code snippet you've provided and the error message you're encountering, it seems like you're trying to use the The Vite, the build tool you're using, does not polyfill Node.js core modules by default for browser targets. This means that it doesn't provide browser-compatible versions of Node.js-specific modules like To resolve this issue, you have a few options:
I hope this helps! If you have any further questions, feel free to ask. For more information, you can refer to the source code of the Sources
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I'm unable to return any data from any type of file using the DirectoryLoader. TypeError: readdir is not a function. Could someone point me in the write direction? Possibly something to do with being within a VITE project
System Info
langchain: v1.22.19
Windows
node: v18.15.0
yarn 1.22.19
Beta Was this translation helpful? Give feedback.
All reactions