sound icon indicating copy to clipboard operation
sound copied to clipboard

TypeError: HowlConstructor.value is not a constructor

Open fabiangfd opened this issue 2 years ago • 4 comments
trafficstars

I just tried to use vueuse/sound in my Nuxt 3 project like so:

const {play} = useSound("/sounds/alert.mp3");

I am getting the following error:

Uncaught (in promise) TypeError: HowlConstructor.value is not a constructor

which is raised here.

@vueuse/sound version: 2.0.0 The howler version installed by my package manager is: 2.2.3.

fabiangfd avatar Jan 13 '23 07:01 fabiangfd

I just tried to use vueuse/sound in my Nuxt 3 project like so:

const {play} = useSound("/sounds/alert.mp3");

I am getting the following error:

Uncaught (in promise) TypeError: HowlConstructor.value is not a constructor

which is raised here.

@vueuse/sound version: 2.0.0 The howler version installed by my package manager is: 2.2.3.

There's an opened PR about this: https://github.com/vueuse/sound/pull/29

imrandomguy56 avatar Jan 14 '23 16:01 imrandomguy56

The PR seems to be merged but I'm still getting an issue on howler with Nuxt 3

I'm getting
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'Howl')

Referring to this line. HowlConstructor.value = howler.default.Howl;

itzaks avatar Mar 01 '23 12:03 itzaks

Same here @itzaks

louia avatar Jun 13 '23 20:06 louia

@louia my workaround was to basically download and put the this repo under modules and import it from there for now

iamroi avatar Jul 06 '23 12:07 iamroi