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.

Uncaught TypeError in development build

See original GitHub issue

Hi, 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:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
gor181commented, Aug 29, 2016

Awesome, thanks anyway, this will be useful for anyone using the same setup as you. 👍

1reaction
gor181commented, Aug 29, 2016

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?

Read more comments on GitHub >

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

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