Closed xalteropsx closed 1 year ago
Could not resolve "highcharts"
node_modules/highcharts-vue/dist/highcharts-vue.min.js:1:90:
1 │ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("highcharts"),require("vue")):"function"==typeof define&&define.amd?define(["highcharts","vue"],e):"object"==typeof exports?expo...
╵ ~~~~~~~~~~~~
You can mark the path "highcharts" as external to exclude it from the bundle, which will remove
this error. You can also surround this "require" call with a try/catch block to handle this
failure at run-time instead of bundle-time.
Hi, thanks for reporting!
Unfortunately, I've struggled to recreate this issue.
Let me tell you what I did step-by-step:
npm create vite@latest
npm i
npm i highcharts highcharts-vue
npm run dev
And everything seems to work correctly. Try to install both highcharts
and highcharts-vue
packages and everything should work.
If it does not, please try to reproduce this issue so I could take a closer look at how to fix it.
thank u bro that npm i highcharts solved it
thank u very much @jakubSzuminski
Sure, no problem.
You can set the chart.backgroundColor: transparent
.
Here's a demo: https://jsfiddle.net/BlackLabel/p7x8hgma/
Vite Error, /node_modules/.vite/deps/highcharts-vue.js?v=be3b32d5 optimized info should be defined