npm module, no dependency on highcharts
elbarto132 opened this issue Β· comments
The npm module of vue-highcharts doesn't have a dependency defined on highcharts, so unless you install the highcharts module manually vue-highcharts will throw an error because highcharts is missing.
You should either add the dependency, or if it's not there for a reason, at least explain it in the readme
That is intended behavior. Vue and Highcharts are peer dependencies in vue-highcharts, when you install vue-highcharts in your project, npm will warn you to install vue and highcharts yourself:
vue-highcharts@0.0.10 requires a peer of highcharts@>=4.2.0 but none was installed.
vue-highcharts@0.0.10 requires a peer of vue@>=1.0.0 but none was installed.
Actually, most vue plugins set vue and the third library as peer dependencies, it's common practice.
Ah ok, i'm using yarn, and yarn doesn't show a warning
$ yarn add vue-highcharts
yarn add v0.24.6
[1/4] π Resolving packages...
[2/4] π Fetching packages...
[3/4] π Linking dependencies...
[4/4] π Building fresh packages...
success Saved 1 new dependency.
ββ vue-highcharts@0.0.10
β¨ Done in 7.10s.
If vue and highcharts are not in your package.json, yarn will also warn you:
[1/4] π Resolving packages...
[2/4] π Fetching packages...
[3/4] π Linking dependencies...
warning "vue-highcharts@0.0.10" has unmet peer dependency "highcharts@>=4.2.0".
warning "vue-highcharts@0.0.10" has unmet peer dependency "vue@>=1.0.0".
[4/4] π Building fresh packages...