howler.js icon indicating copy to clipboard operation
howler.js copied to clipboard

BUG: Howler stopped working in 'browser' mode in Electron and WebView since version v2.2.0

Open onelsonic opened this issue 4 years ago • 4 comments

This commit : https://github.com/goldfire/howler.js/pull/1331/commits/f29cd75266f1ac231e8bfb470bafba1bfec24893 which is dealing with the error : use jsdom-global: error HowlerGlobal is not defined

Caused Howler to stop working in 'browser' mode in Electron since version v2.2.0 when trying to load howler in electron you will get a Uncaught ReferenceError: Howl is not defined and it will not work in Electron.

An optional option should be added to allow running Howler in Browser mode and reversing the effect of the commit above.

onelsonic avatar Dec 22 '20 10:12 onelsonic

I'm also seeing the same error, but not in Electron. I'm running a PWA with Stencil/Ionic and installed Howlerjs through npm install howler. In my component, I am importing like import { Howl } from 'howler';. When running the development server (stencil build --dev --watch --serve).

When I attempt to build the application using the prerender flag (stencil build --prerender) I get the following error:

[25:39.5]  prerendering started ...
[25:39.9]  prerendering failed in 380 ms

[ ERROR ]  Hydrate Error
           ReferenceError: HowlerGlobal is not defined at
           /location/to/code/dist/hydrate/index.js:7436:3 at
...

TheBrockEllis avatar Jan 13 '21 06:01 TheBrockEllis

Any movement on this? I'm getting a 'HowlerGlobal is not defined' when wrapping my app in nwjs, but works fine in browser.

digitaloranges avatar Jul 03 '22 11:07 digitaloranges

you can try using howler.js v2.1.3 and see if it works

onelsonic avatar Aug 22 '22 22:08 onelsonic

It does indeed! Thanks!

digitaloranges avatar Aug 26 '22 18:08 digitaloranges