Skip to content
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

Compatibility with react native projects #181

Open
VariabileAleatoria opened this issue Dec 18, 2024 · 1 comment
Open

Compatibility with react native projects #181

VariabileAleatoria opened this issue Dec 18, 2024 · 1 comment

Comments

@VariabileAleatoria
Copy link

VariabileAleatoria commented Dec 18, 2024

While attempting to use this module in a React Native environment, I encountered the following error:

The package at "node_modules/ollama/dist/index.cjs" attempted to import the Node standard library module "fs". This failed because the React Native runtime does not include the Node standard library.

Is there any chance this library will become compatible with React Native in the future?

@BhavinPatel04
Copy link

BhavinPatel04 commented Dec 21, 2024

You need to use

import ollama from 'ollama/dist/browser';

in react-native.

Although, there is another blocker once you solve this. I've created an issue here and provided a workaround if you are interested :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants