Hi,
I have the following case.
I've created a npm-package with the following component which is using react-rangeslider package.
import React from "react";
import Slider from "react-rangeslider";
import "../../assets/stylesheets/scss/components/atoms/range-slider.scss";
export const RangeSlider = props => {
const { name, value } = props;
return (
<div className="slider">
<span className="slider__name">{name}</span>
<div className="slider__value">
$ {value}
</div>
<Slider
min={0}
max={2000}
orientation="horizontal"
step={25}
{...props}
/>
</div>
)
};
-
After package-publish, if I'm trying to import the RangeSlider component from my published-package, i'm getting the following error:
TypeError: Cannot read property 'RangeSlider' of undefined.
-
If I'm removing import Slider from "react-rangeslider"; and <Slider min={0} max={2000} orientation="horizontal" step={25} {...props} /> and publish the package again, the import will work properly.
I'm have the above error each time when I'm trying to export/import a component which is using an external npm-package.
Could you tell me please if I'm missing any config options for create-react-library package?
Hi,
I have the following case.
I've created a npm-package with the following component which is using
react-rangesliderpackage.After package-publish, if I'm trying to import the
RangeSlidercomponent from my published-package, i'm getting the following error:TypeError: Cannot read property 'RangeSlider' of undefined.If I'm removing
import Slider from "react-rangeslider";and<Slider min={0} max={2000} orientation="horizontal" step={25} {...props} />and publish the package again, the import will work properly.I'm have the above error each time when I'm trying to export/import a component which is using an external npm-package.
Could you tell me please if I'm missing any config options for create-react-library package?