extend is not a function (v 2.7.0)
See original GitHub issueHi, we’re using ng2-charts (v 1.6.0) which has dependency on chart.js Everything was working fine - that is, until the last release. Now we’re getting
TypeError: uF.extend is not a function
at core.element.js:61
at main-aot.js:3
The problem occurs with AoT build using rollup. Rollup config:
import rollup from 'rollup';
import nodeResolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import uglify from 'rollup-plugin-uglify';
import includePaths from 'rollup-plugin-includepaths';
export default {
entry: '../ClientApp/account/dashboard/main-aot.js',
dest: '../ClientApp/account/dashboard/bundle.js',
sourceMap: true,
format: 'iife',
plugins: [
includePaths({
include: {},
paths: ['../ClientApp'],
external: [],
extensions: ['.js']
}),
nodeResolve({jsnext: true, module: true}),
commonjs({
include: [
'../node_modules/rxjs/**',
'../node_modules/email-addresses-custom/lib/**',
'../node_modules/jstz-custom/**',
'../node_modules/rxjs/**',
'../node_modules/chart.js/**',
'../node_modules/chartjs-color/**',
'../node_modules/chartjs-color-string/**',
'../node_modules/color-convert/**',
'../node_modules/color-name/**',
'../node_modules/ng2-charts/**'
],
namedExports: {
'../node_modules/chart.js/dist/Chart.js': ['chart.js'],
'../node_modules/ng2-charts/ng2-charts.js': ['ChartsModule']
}
}),
uglify()
]
}
Environment
- Chart.js version: 2.7.0
- Browser name and version: Chrome 60.0.3112
I am not sure whether is it problem with chart.js or just rollup config.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:16 (5 by maintainers)
Top Results From Across the Web
Vue.js Uncaught TypeError: _vueChartjs.Line.extend is not a ...
Syntax for creating chart component has been changed in the latest version ( 3.0.0 ) of vue-chartjs, hence the error occurred.
Read more >Vue 2.7 is Now in Beta
We are happy to announce that Vue 2.7 is now in beta. Despite Vue 3 now being the default version, we understand that...
Read more >Guides - Moment.js
The guides area is designed to help developers learn to better interact with the date and time problem domain, and the Moment.js library....
Read more >Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError- Some selector is not a function - jQuery is not a function - owlCarousel is...
Read more >Changelog | Meteor API Docs
Remove underscore from package-version-parser PR by harryadel. ... Updated meteor-developer-oauth to use async functions. ... standard-minifier-js@2.7.0.
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
@imranmomin - for the time being, we’re just using older version of chart.js - replacing whole folders of chart.js, chartjs-color and chartjs-color-string in node_modules (not so sure about necessity of replacing the last two, but it doesn’t hurt)
It’s far from ideal though…
Any fix? I get this when trying to use chartjs-plugins-datasource. It breaks on Chart.helpers.extend