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

introJs is not a function using webpack #168

@MatteoMeil

Description

@MatteoMeil

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions