question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Still problem with Vue 2.7

See original GitHub issue

Would 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:closed
  • Created 9 months ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dangreencommented, Dec 19, 2022

@frufin Hi. Chart.js v4.1 and vue-chartjs v5.1 were released with restored CommonJS support.

https://vue-chartjs.org/migration-guides/#esm

0reactions
nthungdevcommented, Dec 19, 2022

@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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found