Victory: Can't resolve 'prop-types' in /victory-chart/lib/components/containers

Created on 23 May 2017  路  2Comments  路  Source: FormidableLabs/victory

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

  • react @15.4.1
  • webpack @2.6.0

Most helpful comment

I fixed the error simply installing prop-types from npm, I noticed is not listed in the dependencies in package.json.

All 2 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michowski picture michowski  路  4Comments

theinterned picture theinterned  路  3Comments

seddonm1 picture seddonm1  路  5Comments

icd2k3 picture icd2k3  路  3Comments

captDaylight picture captDaylight  路  5Comments