slider
slider copied to clipboard
Error importing RCTooltip
I cannot build project because of import error in missing exported member of rc-tooltip.
Error as below:
ERROR in [at-loader] ./node_modules/@types/rc-slider/index.d.ts:16:10
TS2614: Module '"../../rc-tooltip/lib"' has no exported member 'RCTooltip'. Did you mean to use 'import RCTooltip from "../../rc-tooltip/lib"' instead?
For dependencies:
=> Found "[email protected]"
=> Found "[email protected]"
I have the same error.
As i see, in @types/rc-slider/index.d.ts
you have line:
import { RCTooltip } from "rc-tooltip";
This looks like reason of this error. When I installed rc-tooltip
and @types/rc-tooltip
as dependency of my project this error disappeared. But this shouldn't work like that.
Having the same issue :(
Found a workaround.
Uninstall the @types/rc-tooltip package, then add ts-ignore
before the import of the Slider component:
//@ts-ignore
import Slider from 'rc-slider';
Not ideal, but at least the error go away.
This is caused by the fact that the types
value is missing in the package.json so typescript can't find the type definitions. I've opened a PR #670 that fixes this.