[Bug]: Still problem with Vue 2.7
See original GitHub issueWould you like to work on a fix?
- Check this if you would like to implement a PR, we are more than happy to help you go through the process.
Current and expected behavior
HI, I’m using vue-cli & Vue 2.7.10 Both vue-chartjs & chart.js successefully installed using Yarn
I get an error trying to import vue-chartjs from a component:
import { Bar } from 'vue-chartjs'
=>
Failed to compile.
./src/components/main/views/server/Status.vue?vue&type=script&lang=js& (./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/main/views/server/Status.vue?vue&type=script&lang=js&)
Module not found: Error: Can't resolve 'vue-chartjs' in '/Users/fredericrufin/Sites/webapachekit/src/components/main/views/server'
Reproduction
Failed to compile. ./src/components/main/views/server/Status.vue?vue&type=script&lang=js& (./node_modules/cache-loader/dist/cjs.js??ref–13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref–1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/main/views/server/Status.vue?vue&type=script&lang=js&) Module not found: Error: Can’t resolve ‘vue-chartjs’ in ‘/Users/fredericrufin/Sites/webapachekit/src/components/main/views/server’
chart.js version
4.0.1
vue-chartjs version
5.0.1
Possible solution
No response
Issue Analytics
- State:
- Created 9 months ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Vue 2.7+ no longer fails on and report type errors in build and ...
Based from the vuejs-type-bug-demo root folder: cd ./hello-world-2.6 && npm install && npm run build; cd ./hello-world-2.7 && ...
Read more >ESLint errors after upgrading from Vue 2.6.14 to Vue 2.7
We decided to upgrade Vue in our project from 2.6.14 to 2.7.x . Unfortunately, while following the upgrade guide, after bumping the Vue...
Read more >The Vuetify roadmap
Vuetify is a Material Design component framework for Vue.js. ... focus on porting remaining missing v2 components and general bug fixing.
Read more >Suspense | Vue.js
<Suspense> is a built-in component for orchestrating async dependencies in a component tree. It can render a loading state while waiting for multiple...
Read more >vue-template-compiler - npm
Latest version: 2.7.14, last published: 2 months ago. ... generateCodeFrame API to generate a code frame for the error. whitespace.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@frufin Hi. Chart.js v4.1 and vue-chartjs v5.1 were released with restored CommonJS support.
https://vue-chartjs.org/migration-guides/#esm
Works for me now. Thank you very much!