huggingface / transformers.js

State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!
https://huggingface.co/docs/transformers.js
Apache License 2.0
12.23k stars 775 forks source link

Module Not Found error ('./' import issue) #1058

Closed gurveervirk closed 3 days ago

gurveervirk commented 4 days ago

System Info

"dependencies": { "@huggingface/transformers": "^3.1.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "react": "^18.3.1", "react-dom": "^18.3.1", "react-scripts": "5.0.1", "web-vitals": "^2.1.4" }

Basic CRA app

Environment/Platform

Description

I am trying out the React App tutorial from this link. I want to use transformers.js for a semantic search app but haven't been able to get it to work for the past couple of days.

I do not want to eject the app.

I have tried both @xenova/transformers and @huggingface/transformers and a number of versions of both.

Request you to let me know my options.

Thanks!

Reproduction

Just following this tutorial.

xenova commented 3 days ago

Could you try using Vite instead of Create React App? Create React App has been deprecated since 2023 (see here).

gurveervirk commented 3 days ago

Got it! Thanks! Closing the issue.