Uncaught TypeError in development build
See original GitHub issueHi, I’m using:
"react": "^15.3.0",
"react-chartjs-2": "^1.2.4",
"webpack": "^1.13.1"
and when I try use chart with my wepack dev config like this:
import React from 'react';
import { connect } from 'react-redux';
import { Line } from 'react-chartjs-2';
...
render() {
return (
<div>
{ data ? <Line data={this.props.data} options={LINE_CHART_OPTIONS} /> : <Loader/> }
</div>
);
}
I get this error everytime
core.controller.js:496 Uncaught TypeError: Can't add property _meta, object is not extensible
But things work just fine when I build app with my production config, where webpack.UglifyJsPlugin added:
var uglifyPlugin = new webpack.optimize.UglifyJsPlugin({
compress: {
sequences: true,
dead_code: true,
conditionals: true,
booleans: true,
unused: true,
if_return: true,
join_vars: true,
drop_console: true
},
mangle: {
except: ['$super', '$', 'exports', 'require']
},
output: {
comments: false
}
});
Please let me know if any additional info needed.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
Top Results From Across the Web
reactjs - after npm run build getting Uncaught TypeError ...
when I start app on development server, it works good. Source source code: popup: import React, {Component} from 'react'; ...
Read more >Plugin production build throws "TypeError: define is not a ...
Production build has been successfuly builded but fails to work with exception (on plugin configuration page): Uncaught (in promise) ...
Read more >Troubleshooting Angular production build errors — Uncaught ...
Troubleshooting Angular production build errors — Uncaught TypeError: Cannot read properties of undefined (reading 'a').
Read more >Solved: Re: Editor Widget throwing "Uncaught TypeError: Ca...
I've managed to build my application using WebPack instead and it is now seems to be functioning as desired. Glad I was able...
Read more >Amplify + React Build - Uncaught TypeError - Ivan Bliskavka
My AWS Amplify + React app throws an Uncaught TypeError when running the production build, but works just fine with react-scripts start.
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
Awesome, thanks anyway, this will be useful for anyone using the same setup as you. 👍
Hey @RusinovAnton ,
I agree that immutable data is really common, however I think that the data should be normalized prior passed to react-chartjs-2 and chart.js?