plotly / plotly/angular-plotly.js
[vite] Error when evaluating SSR module
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 242
- Forks
- 81
- Avg merge
- 8h 48m
- Merged PRs (30d)
- 18
Description
Angular Version : 18+
Dependencies
"angular-plotly.js": "^6.0.0",
"plotly.js-dist-min": "^2.35.2",
devDependencies
"@types/plotly.js-dist-min": "^2.3.4"
I am able to start the application, however getting this errror,
11:23:53 PM [vite] Error when evaluating SSR module /@fs/C:/Users/SomeUser/Desktop/source-code/MyAngularApp/.angular/cache/18.1.1/vite/deps_ssr/plotly__js-dist-min.js?v=c24ab8f7:
|- ReferenceError: self is not defined
at node_modules/plotly.js-dist-min/plotly.min.js (C:\Users\SomeUser\Desktop\source-code\MyAngularApp.angular\cache\18.1.1\vite\deps_ssr\plotly__js-dist-min.js:13:7)
at __require2 (C:\Users\SomeUser\Desktop\source-code\MyAngularApp.angular\cache\18.1.1\vite\deps_ssr\chunk-NQ4HTGF6.js:44:50)
at eval (C:\Users\SomeUser\Desktop\source-code\MyAngularApp.angular\cache\18.1.1\vite\deps_ssr\plotly__js-dist-min.js:145848:16)
at async instantiateModule (file:///C:/Users/SomeUser/Desktop/source-code/MyAngularApp/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:53451:5)
11:23:53 PM [vite] Error when evaluating SSR module /chunk-4EVLDWLS.mjs:
|- ReferenceError: self is not defined
at node_modules/plotly.js-dist-min/plotly.min.js (C:\Users\SomeUser\Desktop\source-code\MyAngularApp.angular\cache\18.1.1\vite\deps_ssr\plotly__js-dist-min.js:13:7)
at __require2 (C:\Users\SomeUser\Desktop\source-code\MyAngularApp.angular\cache\18.1.1\vite\deps_ssr\chunk-NQ4HTGF6.js:44:50)
at eval (C:\Users\SomeUser\Desktop\source-code\MyAngularApp.angular\cache\18.1.1\vite\deps_ssr\plotly__js-dist-min.js:145848:16)
at async instantiateModule (file:///C:/Users/SomeUser/Desktop/source-code/MyAngularApp/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:53-UI.angular\cache\18.1.1\vite\deps_ssr\plotly__js-dist-min.js:13:7)
at __require2 (C:\Users\SomeUser\Desktop\source-code\MyAngularApp.angular\cache\18.1.1\vite\deps_ssr\chunk-NQ4HTGF6.js:44:50)
at eval (C:\Users\SomeUser\Desktop\source-code\MyAngularApp.angular\cache\18.1.1\vite\deps_ssr\p-UI.angular\cache\18.1.1\vite\deps_ssr\plolotly__js-dist-min.js:145848:16)
at async instantiateModule (file:///C:/Users/SomeUser/Desktop/source-code/MyAngularApp/node_modul_ssr\chunk-NQ4HTGF6.js:44:50)es/vite/dist/node/chunks/dep-C1-ZB6nQ.js:53451:5) lotly__js-dist-min.js:145848:16)
ERROR ReferenceError: self is not defined es/vite/dist/node/chunks/dep-C1-ZB6nQ.js:53
at node_modules/plotly.js-dist-min/plotly.min.js (C:\Users\SomeUser\Desktop\source-code\MyAngularApp.angular\cache\18.1.1\vite\deps_ssr\plotly__js-dist-min.js:13:7)
at __require2 (C:\Users\SomeUser\Desktop\source-code\MyAngularApp.angular\cache\18.1.1\vite\deps-UI.angular\cache\18.1.1\vite\deps_ssr\plo_ssr\chunk-NQ4HTGF6.js:44:50)
at eval (C:\Users\SomeUser\Desktop\source-code\MyAngularApp.angular\cache\18.1.1\vite\deps_ssr\p_ssr\chunk-NQ4HTGF6.js:44:50)lotly__js-dist-min.js:145848:16) lotly__js-dist-min.js:145848:16)
at async instantiateModule (file:///C:/Users/SomeUser/Desktop/source-code/MyAngularApp/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:53es/vite/dist/node/chunks/dep-C1-ZB6nQ.js:53451:5)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Angular 18+ SSR failure with the listed angular-plotly.js and plotly.js-dist-min dependencies. Inspect node_modules/plotly.js-dist-min/plotly.min.js and the Vite SSR evaluation path shown in the stack trace. Done means the application starts without the “self is not defined” error during SSR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript, vite
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100