Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'babelify' from '/node_modules/slider-manager' #1

Open
baptistebriel opened this issue Feb 17, 2017 · 0 comments
Open

Comments

@baptistebriel
Copy link
Owner

If you're having this error on a project that's not using babelify to compile ES6 to ES5, I just fixed it using the build file of slider-manager as main entry file.

In your package.json file, just add an entry to the "browser" field:

{
  "browser": {
    "slider-manager": "./node_modules/slider-manager/build/manager.min.js"
  }
}

And then, when creating a new instance of slider-manager:

var Manager = require('slider-manager');

var slider = new Manager.default({
  length: length,
  loop: true,
  callback: callback
});

slider.init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant