I have to use Meteor with React for a school project. I build a website in which I'd like to add a carousel.
To do so, I tried to use : https://github.com/vazco/meteor-universe-react-carousel/
With the example script :
var React = require('react');
var Slider = require('react-slick');
var SimpleSlider = React.createClass({
render: function () {
var settings = {
dots: true,
infinite: true,
speed: 500,
slidesToShow: 1,
slidesToScroll: 1
};
return (
<Slider {...settings}>
<div><h3>1</h3></div>
<div><h3>2</h3></div>
<div><h3>3</h3></div>
<div><h3>4</h3></div>
<div><h3>5</h3></div>
<div><h3>6</h3></div>
</Slider>
);
}
});
Using this code, I get : ReferenceError: require is not defined (l1)
After some research, I saw several solutions that didn't work for me, like using Meteor.require or Npm.require.
I followed links like 'require is not defined' in Meteor.js when including NPM package or Meteor cannot find module "module"
Now I'm a bit lost in all this, how can I use a package imported with meteor add package ? Is meteorite deprecated, do I need to use npm ?
Thanks in advance for your help.