Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

introJs is not a function using webpack #168

Open
MatteoMeil opened this issue Oct 10, 2019 · 0 comments
Open

introJs is not a function using webpack #168

MatteoMeil opened this issue Oct 10, 2019 · 0 comments

Comments

@MatteoMeil
Copy link

MatteoMeil commented Oct 10, 2019

Using version 3.5.0 of this package with webpack results in this error:

TypeError: introJs is not a function

It is caused by intro.js@2.5.0 exporting system: it exports itself as an object when using webpack or RequireJS, while exports itself as a function using window (see line 1984).

This error would be fixed using latest version of intro.js but your package.json still requires version 2.5.0 while in master it has been fixed in a5b4f9f commit.
Could you please merge the change to make the package work with Webpack? Or at least could you fix the import system changing the code to:

// ...
(typeof self !== "undefined" ? self : this, function(angular, introJs) {

    introJs = introJs.introJs;

//...

?

Until you update your package, the possible quick fix (like an hack, but it works) is to install latest intro.js and remove the downloaded node_modules inside your package

@MatteoMeil MatteoMeil changed the title introJs is not a function with webpack introJs is not a function using webpack Oct 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant