then, I found the following dependencies are necessary to use this geocoder.
npm i -D events @types/events @types/node
I am not sure how many people are using vite with this geocoder, but this dependencies info can be documented somewhere in the repo. I think vite is becoming more popular.
I had an error of
TypeError: EventEmitter is not a constructor
when I use it with vite.I found the below stackoverflow, https://stackoverflow.com/questions/69717406/typeerror-eventemitter-is-not-a-constructor-at-new-mapboxgeocoder
then, I found the following dependencies are necessary to use this geocoder.
I am not sure how many people are using vite with this geocoder, but this dependencies info can be documented somewhere in the repo. I think vite is becoming more popular.