Cannot use library in electron + vite + typescript environment #1326
Unanswered
aivfkesavan
asked this question in
Q&A
Replies: 2 comments
-
Note: Even tried to import the methods dynamically like follows in my async function const {
SimpleDirectoryReader
} = await import("llamaindex"); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Could you see |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Following are my configurations for my project (Electron + typescript + vite)
tsconfig.json
vite.config.ts
Getting error as
ReferenceError: __dirname is not defined in ES module scope This file is being treated as an ES module because it has a '.js' file extension and 'package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
Beta Was this translation helpful? Give feedback.
All reactions