josefarias / hotwire_combobox

An accessible autocomplete for Ruby on Rails.
https://hotwirecombobox.com
MIT License
436 stars 26 forks source link

Can not use the gem with npm package #115

Closed JuanVqz closed 4 months ago

JuanVqz commented 5 months ago

Describe the bug

I wanted to try the gem, followed the readme, and implemented it easily (you can see the PR linked below)

PR: https://github.com/JuanVqz/doctors/pull/521

To Reproduce Steps to reproduce the behavior:

  1. Install the gem and npm package
  2. Run the rails server and you should see the error.

Expected behavior Be able to use the gem

Screenshots hw-combobox

Desktop (please complete the following information):

Additional context I solved it with a temporal workaround, renaming the file from "app/assets/javascripts/hotwire_combobox.esm.js", to "app/assets/javascripts/hotwire_combobox.umd.js",.

hw-combobox-2

I'll continue debugging, thanks!

josefarias commented 4 months ago

Oh, strange. Seems like the esm build is missing from the published package. I'll take a look. Thanks!

josefarias commented 4 months ago

I think this might do the trick but we'll have to wait until the next version is published to npm to know for sure https://github.com/josefarias/hotwire_combobox/pull/117

josefarias commented 4 months ago

@JuanVqz should be good to go per https://www.npmjs.com/package/@josefarias/hotwire_combobox?activeTab=code!

Closing for now but let me know if the issue persists after updating to version 0.2.0, please

JuanVqz commented 4 months ago

@josefarias, Thank you for fixing and releasing it really quick, was faster than I thought, Saludos!

Will update tomorrow and let you know how it goes

JuanVqz commented 4 months ago

@josefarias the fix works like a charm, thanks! :shipit:

josefarias commented 4 months ago

Great to hear! Thanks for reporting back 🫡