Just loading victory components
import { VictoryBar, VictoryChart, VictoryAxis, VictoryTheme, VictoryStack } from 'victory';
i recive a huge list of errors like this one
ERROR in ./~/victory-chart/lib/helpers/common-props.js
Module not found: Error: Can't resolve 'prop-types' in './node_modules/victory-chart/lib/helpers'
@ ./~/victory-chart/lib/helpers/common-props.js 1:72-93
@ ./~/victory-chart/lib/components/victory-chart/victory-chart.js
@ ./~/victory-chart/lib/index.js
@ ./~/victory/lib/index.js
@ ./app/components/MajorKpi/index.js
@ ./app/containers/HomePage/index.js
@ ./app/routes.js
@ ./app/app.js
@ multi eventsource-polyfill webpack-hot-middleware/client?reload=true ./app/app.js
any idea why?
i'm working with
I fixed the error simply installing prop-types from npm, I noticed is not listed in the dependencies in package.json.
@wanbinkimoon I'm sorry you encountered this error. We decided not to include prop-types in Victory's dependencies since with React 16 many people will be including this package in their projects already. We wanted to avoid extra dependencies and potential version skew. The need to install prop-types has been added to the readmes of all packages, but is not yet called out on the docs site. I will open an issue to correct this oversight.
Most helpful comment
I fixed the error simply installing
prop-typesfromnpm, I noticed is not listed in the dependencies inpackage.json.