-
Notifications
You must be signed in to change notification settings - Fork 60
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
Using external react package like "react-rangeslider" causing "cannot read property "RangeSlider" of undefined #47
Comments
I'd like to know the same. @florentinhetriuc did you manage to solve it? |
Hey @nxmohamad. No. I wasn't able to solve the issue :(. |
@florentinhetriuc I'm going to email you |
Hi, I have the same problem, I'm trying to use this https://github.com/tannerlinsley/react-table#readme |
@florentinhetriuc @nxmohamad @ronaiza-cardoso It seems it happens whatever package you try to consume. I even tested author's example However after few days of trying I've found some walkaround. If your package needs to consume some other package (i.e. by
I really don't know if it's hack, tricky walkaround or why does it work now. Configuration and dealing with webpack, babel and so on is really not my point of interests. It just works and push me further with my projects :-) |
thanks @LukaszNowakPL ! |
thank you very much @LukaszNowakPL! |
Any further progress on this? The workaround seems to work for me, but it really is suboptimal that any app that uses my library needs to be aware of the dependencies that the library uses. |
So, I was having the same problem and after commenting the //splitChunks: {
// chunks: 'all',
// name: false,
//}, It did the trick to me since it starts to generate a single |
Thanks @victorheringer, this solution worked for me. Hoping there aren't any hidden drawbacks to this approach. |
I followed this and added Module not found: Can't resolve 'd:\Development\Packages\wurtzu\node_modules\babel-preset-react-app\node_modules\@babel\runtime/helpers/slicedToArray' in 'd:\Development\Packages\wurtzu\node_modules\react-dev-utils'``` |
Hi,
I have the following case.
I've created a npm-package with the following component which is using
react-rangeslider
package.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?
The text was updated successfully, but these errors were encountered: