[vite] Error when evaluating SSR module

Offen
#273 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
30/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
angular, typescript, vite
Bereich
frontend, web-dev

Rechercherichtung

Beginne damit, den Angular-18+-SSR-Fehler mit den aufgeführten angular-plotly.js- und plotly.js-dist-min-Abhängigkeiten zu reproduzieren. Untersuche node_modules/plotly.js-dist-min/plotly.min.js und den im Stack Trace gezeigten Vite-SSR-Auswertungspfad. Erledigt ist es, wenn die Anwendung ohne den Fehler „self is not defined“ während des SSR startet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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)

Vorherrschende Sprache
TypeScript
Sterne
242
Forks
81
Ø Merge
8 Std. 48 Min.
Gemergte PRs (30 T.)
18

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus plotly/angular-plotly.js

Alle Issues in plotly/angular-plotly.js

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.