Home forums Chart Support React example setup error

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #22927

    I tried setting up the example from the page https://canvasjs.com/docs/charts/integration/react/
    I have my canvasjs.min.js and canvasjs.react.js in my /src/ folder and getting the following error:

    TypeError: Cannot assign to read only property ‘exports’ of object ‘#<Object>’
    39 | }
    40 | }
    41 |
    > 42 | module.exports = {
    43 | CanvasJSChart: CanvasJSChart,
    44 | CanvasJS: CanvasJS
    45 | };

    Any possible solutions?
    Thank you



    Can you please share a sample project over google-drive or one-drive reproducing the issue you are facing, so that we can look into your code, understand the scenario better and help you out?

    Priyanka M S
    Team CanvasJS


    Here is my App.js in the src/

    I also have the canvasjs.react.js and canvasjs.min.js in the src/ folder



    The code you have shared seems to be working fine. Please cross-check the paths you specify while importing the files. Kindly take a look at this sample project.

    Priyanka M S
    Team CanvasJS

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.