#community-help

Troubleshooting Typesense Installation in a React JavaScript App

TLDR Lukas faced difficulty with installing Typesense in a React app for full text search. Jason confirmed Typesense works with JavaScript and advised to disregard Typescript type warnings.

Powered by Struct AI
Jul 15, 2021 (30 months ago)
Lukas
Photo of md5-d9deaf8d1683beb47108307453fe58bc
Lukas
06:57 PM
Hey all, I have a app with firestore and I'm looking for full text search. I have installed typesense via Option 1: Typesense Cloud, Then I tried installing client with "npm install --save typesense" and after importing it with
import Typesense from 'typesense'

I just get that Typesense is Undefined, so I guess it doesn't work with javascript? has anyone had any success with full text search with firestore?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:59 PM
Lukas It definitely works with Javascript! When you say "app", are you using React Native?
Lukas
Photo of md5-d9deaf8d1683beb47108307453fe58bc
Lukas
07:00 PM
its just react js web app
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:01 PM
Could you post the full stack trace that you see, and also the rest of the file where you have the import statement?
Lukas
Photo of md5-d9deaf8d1683beb47108307453fe58bc
Lukas
07:27 PM
Did I miss something? or is there more to it than simply running npm install --save typesense
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:48 PM
Oh that's just a warning saying that there are no Typescript types for the typesense package. You can ignore that, it will still work
07:49
Jason
07:49 PM