superdev-tech / nuxt-plotly

📊 Enhance your Nuxt 3 projects with interactive data visualizations using nuxt-plotly – Simplified Plotly.js integration made easy!
https://stackblitz.com/edit/nuxt-starter-1bs1ke?file=app.vue
MIT License
26 stars 4 forks source link

self is not defined #2

Closed bbagherian closed 1 year ago

bbagherian commented 1 year ago

I followed everything on the documentation but get this error IF I reload the page. It was ok on spa mode starting from the root.


500
self is not defined

at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at ModuleWrap. (node:internal/modules/esm/translators:169:29)
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Boomgeek commented 1 year ago

@bbagherian This module requires client-only. Your error looks like you use the component on the server side.

Please see this

If you need to use the Plotly function without your error, Please see this article Support in nuxt-plotly@1.0.12