You must be logged in to post your query.
Home › Forums › Chart Support › module.exports error with reactJS
Tagged: reactjs
TypeError: Cannot assign to read only property ‘exports’ of object ‘#<Object>’ Module.<anonymous> src/Components/canvasjs.react.js:42 39 | } 40 | } 41 | > 42 | module.exports = { 43 | CanvasJSChart: CanvasJSChart, 44 | CanvasJS: CanvasJS 45 | };
I get the above error when I try to render the above. Just a simple chart there are no ES6/ES5 errors on the canvasjs.react.js file. It’s the exact same one I downloaded. Can someone please help me out with the solution?
Thanks!
Nevermind.The problem is mixing of ES5 and ES6 import exports (module.exports) is not allowed after webpack2. Deprecated the webpack version and works!
@gautamtata,
Glad that you figured it:)
__ Priyanka M S Team CanvasJS
You must be logged in to reply to this topic. Login/Register