Dogstudio / highway

Highway - A Modern Javascript Transitions Manager

Home Page:https://highway.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when using Highway ES5 version

Griever12 opened this issue · comments

Hello,

I need help to use Highway ES5 version.

When i load it like explain in the doc, i have this error in my console :

highway.js:1 Uncaught ReferenceError: define is not defined
at Object.2 (highway.js:1)
at o (_prelude.js:1)
at _prelude.js:1
at Object.287../components/test-highway (main.js:2)
at o (_prelude.js:1)
at r (_prelude.js:1)
at _prelude.js:1

Any idea to fix that ?

Thanks :-)

Hello @Griever12 ,

Would it be possible for you to tell us which highway version you are using, along with the code you wrote to do a highway test ? package.json would also be great to be super effective in the way we could give you a hand.

Greetings,

Hi @ThaoD5

I got the same issue as @Griever12 when I updated to 2.1.0 before this update we were using 2.0.8. Version 2.0.8 was working smooth and nicely.

At our studio we are working with Gulp without Browserify so we are not importing Highway as recommended in the docs. In version 2.0.8 there was an "es5" folder. We were using the javascript file inside that folder. This "es5" folder is what we are missing right now. Maybe this information helps you a bit to figure out what the problem is.

Thanks! If you need some more info please let me know.

Hello @tsharms,

What you probably need is the built ES5 version.

We indeed changed the architecture of the files. The compiled ES5 version can now be found inside the build folder.
You therefor need now to resolve the source into your build configuration for highway in order to have the already-compiled file imported.

"@dogstudio/highway": "@dogstudio/highway/build/highway.min.js"

Hope this helps, keep me updated :-)

Hi @ThaoD5,

I've checked but it isn't working when I'm using the minified version in the build folder. I've looked at version 2.0.8 and I think I see what the difference is in version 2.1.0.

In version 2.0.8 the module is checking if define is a function and exists. In versions 2.1.0 this check is skipped and it is assumed that define is available.

highway-define

Maybe there is a mistake in the build configuration.
Thanks!

Hey @Griever12 @tsharms,

We release the v2.1.1 that should fix the problem.
We were building the ES5 version as an AMD library.
We updated it to build the ES5 version as a UMD library.

Can you please update Highway to this version and let us know if it works now ?

Best regards,
Anthodpnt

Hi @Anthodpnt,

I just updated and our code is working again with the latest version!
Thanks a lot and great work with this library :)

Hello @Anthodpnt @ThaoD5 @tsharms,
Thank you all for reply, al is working fine now.

Very great tool and work :-)