# What is causing "Uncaught ReferenceError: Plotly is not defined"?

**URL:** <https://community.plotly.com/t/what-is-causing-uncaught-referenceerror-plotly-is-not-defined/82763>\
**Category:** plotly.js\
**Created:** [March 4, 2024, 9:14pm UTC](https://community.plotly.com/t/what-is-causing-uncaught-referenceerror-plotly-is-not-defined/82763 "2024-03-04T21:14:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sloanthrasher](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/sloanthrasher/32/27199_2.png) [@sloanthrasher](https://community.plotly.com/u/sloanthrasher)\
**Post date:** [March 4, 2024, 9:14pm UTC](https://community.plotly.com/t/what-is-causing-uncaught-referenceerror-plotly-is-not-defined/82763/1 "2024-03-04T21:14:55Z")

</div>

Hi,  
New to plotly.js and trying to get it working on a WordPress page in a custom form using PHP and JavaScript.  
I enqueue the script, and I have conformed it is being loaded when the page loads. I then setup the data and layout for the chart (this part was working on another page on a different site). But the debugger in Firefox shows the message **“Uncaught ReferenceError: Plotly is not defined”** on the line where the chart is instantiated.

`Plotly.newPlot('#myChart', data, layout, config);\n";`

I’ve tried loading the plotly js file from the CDN and from the site itself, with no difference in results.

I’m using “/forms/js/plotly-2.29.1.min.js”, and I have confirmed it is being loaded without errors in the debugger.
