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.

Compatibility with Vue 2.1.10

See original GitHub issue

2017-01-19

Expected Behavior

vue-chartjs works with vue@2.1.10.

Actual Behavior

Running vue-chartjs@2.3.2 with vue@2.1.10 results in the application crashing with Uncaught TypeError: Cannot read property 'prototype' of undefined. Rolling back to vue-chartjs@2.2.0 prevents the crash, but the charts are not being rendered.

Complete error stack:

Uncaught TypeError: Cannot read property 'prototype' of undefined
    at mergeOptions (eval at <anonymous> (app.js:624), <anonymous>:1360:17)
    at Function.Vue.extend (eval at <anonymous> (app.js:624), <anonymous>:3632:20)
    at eval (eval at <anonymous> (app.js:780), <anonymous>:9:36)
    at Object.<anonymous> (app.js:780)
    at __webpack_require__ (app.js:556)
    at fn (app.js:87)
    at eval (eval at <anonymous> (app.js:1056), <anonymous>:5:19)
    at Object.<anonymous> (app.js:1056)
    at __webpack_require__ (app.js:556)
    at fn (app.js:87)

Environment

  • OS: Ubuntu 16.04 64-bit (Linux 4.4)
  • NPM Version: 3.10.10

Thanks for the support!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
aperturelesscommented, Jan 19, 2017

Ah gotcha.

The problem is the mixin. Check this out: https://github.com/apertureless/vue-chartjs#reactivity

You have to import { mixins } from ‘vue-chartjs’ and use it then as mixins: [mixins.reactiveProp]

Or you can make a es6 destructive assign

import { Line, mixins } from ‘vue-chartjs’ const { reactiveProp } = mixins

and use it then as reactiveProp.

Also described in the release notes

0reactions
Robfzcommented, Jan 19, 2017

Great, problem fixed!

I didn’t notice the change of how to import the mixins. Thanks for the help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

2.1.10 - vue - npm
The progressive JavaScript framework for building modern web UI.. Latest version: 3.2.45, last published: a month ago. Start using vue in ...
Read more >
vue/CHANGELOG.md at main · vuejs/vue - GitHub
The SFC compiler for 2.7 now uses PostCSS 8 (upgraded from 7). PostCSS 8 should be backwards compatible with most plugins, but the...
Read more >
API - Vue.js
Assign a custom handler for runtime Vue warnings. Note this only works during development and is ignored in production. ignoredElements. Type: Array<string | ......
Read more >
How do I fix a "Vue packages version mismatch" error on ...
This works for me. Thanks! By the way, I've experienced this on Laravel Nova. – marlo. Jan 25 at 2:14.
Read more >
vue-template-compiler versions and peer dependencies
vue -template-compiler versions and peer dependencies ... has a list of all versions of vue-template-compiler with compatible (peer) dependencies. ... 2.1.10.
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