typesense / typesense-instantsearch-adapter

A JS adapter library to build rich search interfaces with Typesense and InstantSearch.js
MIT License
406 stars 63 forks source link

npm install throws an error on Windows #25

Open srconklin opened 3 years ago

srconklin commented 3 years ago

Description

running npm installthrows an error (on Windows?)

Steps to reproduce

npm install

Expected Behavior

npm to complete and node_modules folder to appear

Actual Behavior

image

I see nothing of interest in the mentioned log file. Other projects are updating installing fine I tried npm cache clean --force I updated to the last node and npm nothing seems to work

Metadata

OS: Windows 10 Pro 20H@ 19042.685

jasonbosco commented 3 years ago

@srconklin I just cloned a fresh copy of the repo and ran npm install and I didn't see this issue. I'm on macOS though.

Could you try removing package-lock.json and the node_modules folder, then running npm rebuild and then finally npm install to see if that fixes the issue?

Also, just to be sure, could you run npm --version to ensure that the latest npm binary is being used?

srconklin commented 3 years ago

@jasonbosco I tried that... it got a little further but still bails out before completing: image

jasonbosco commented 3 years ago

@srconklin I have a feeling this is because of issues with installing puppeteer on Windows. It's only used to run integration tests, so if you're just looking to run the testground app (based on my comment), you could just comment out all the puppeteer dependencies from package.json and see if that helps.

In any case, let me do this: I'll extract the ecommerce app from this repo into a separate repo with minimal dependencies and share that with you. I've been meaning to build an ecommerce demo anyway, so perfect time to get started on that. I'll keep you posted shortly.

srconklin commented 3 years ago

@jasonbosco Thank You! You were right. I removed all those instances (and Jest) and it worked. I would still like to see the bare bones repo though..Let me know when that is ready

srconklin commented 3 years ago

@jasonbosco I got the demo up and running locally. Thanks so much for your patience and help. One final question: I had not installed yarn before, so I had to.. Can you tell what the command below does and do I need that if I want to convert my existing algolia project to use the typesense-instantsearch-adaptor where I am only currently using Parcel to start it for development.

yarn link && cd test/support/testground && yarn link typesense-instantsearch-adapter && yarn install && yarn start

jasonbosco commented 3 years ago

Awesome!

yarn link && cd test/support/testground && yarn link typesense-instantsearch-adapter is just boiler-plate to the get demo app to use the latest (potentially) work-in-progress adapter code in the repo, especially when running integration tests. This is not needed if you just install the adapter from NPM into your own project.

You'd only need to run yarn install && yarn start, or npm install && npm start just like any other instant search app.

For eg, here's how to start the songs search instant search app locally: https://github.com/typesense/showcase-songs-search#development

Hopefully, this becomes clearer once I extract the ecommerce app into a standalone app.

jasonbosco commented 3 years ago

@srconklin I've extracted the app into a separate repo here: https://github.com/typesense/showcase-ecommerce-store. Hopefully this one's straightforward to get up and running.

Sorry about the dance you had to go through earlier to boot the testground app standalone.

I still need to add some better-looking UI to the showcase app, but it should give you a sense of what's possible functionality-wise.

Let me know how it goes!

srconklin commented 3 years ago

@jasonbosco Thanks so much. you are very responsive which gives me a very good comfort level about picking this lib over the others.. No need to apologize, I am sure my issues are mostly Windows related. I will install the separate app now and then I believe with the example code I will have everything I need to move forward. I will let you know how I progress. I am sure the client is going to really love how this demo will shape up with this awesome search experience.