-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with importing from 'ollama/browser'
#151
Comments
Note that compilation works with |
Seems like the same issue as #104, but their fix was changing the module and moduleresolution |
Thanks for the pointer, @hopperelec. Turns out that So, in summary, Maybe somebody with more TypeScript/WebPack experience can help? |
Yes, this definitely seems like something which could be improved with ollama-js, but I'm not experienced enough with Webpack and the tsconfig to know what the issue is, sadly. |
This is coming up with @langchain/ollama as they explicitly import "olamma/browser" and not "ollama/dist/browser", so I would think it's a big headache for a lot of people. In the interim, is there an older version of ollama-js that doesn't have this issue? |
I have an Electron Webpack/TypeScript project created with Electron Forge.
This is the default
tsconfig.json
in this case: webpack-typescript/tsconfig.json.I'm trying to use
ollama-js
within that project and having trouble importing fromollama/browser
(i.e., viaimport ollama from 'ollama/browser';
).The first error I get is the following:
Once I start changing
moduleResolution
to something other than the defaultNode
, I get other errors (e.g.,An unhandled rejection has occurred inside Forge: Error: Unable to use specified module loaders for ".ts".
).I wonder, is this something about the template project setup? Or is there maybe a problem with the
ollama-js/browser
packaging? 🤔The text was updated successfully, but these errors were encountered: