ReferenceError: Element is not defined
See original GitHub issueHere is the error log while hit npm run serve:ssr
var matchesMethod = Element.prototype.matches ||
^
ReferenceError: Element is not defined
at D:\projects\yra\dist\server\main.js:141177:25
at Vz3n (D:\projects\yra\dist\server\main.js:141078:13)
at Object.Vz3n (D:\projects\yra\dist\server\main.js:141080:2)
at __webpack_require__ (D:\projects\yra\dist\server\main.js:20:30)
at Module.UUxd (D:\projects\yra\dist\server\main.js:138834:76)
at __webpack_require__ (D:\projects\yra\dist\server\main.js:20:30)
at Object.sZXh (D:\projects\yra\dist\server\main.js:220458:12)
at __webpack_require__ (D:\projects\yra\dist\server\main.js:20:30)
at Object.gnUf (D:\projects\yra\dist\server\main.js:180589:12)
Dependencies are:
dependencies": {
"@angular/animations": "~8.2.13",
"@angular/common": "~8.2.13",
"@angular/compiler": "~8.2.13",
"@angular/core": "~8.2.13",
"@angular/forms": "~8.2.13",
"@angular/platform-browser": "~8.2.13",
"@angular/platform-browser-dynamic": "~8.2.13",
"@angular/platform-server": "~8.2.13",
"@angular/router": "~8.2.13",
"@auth0/angular-jwt": "^3.0.0",
"@fullcalendar/angular": "^4.3.1",
"@fullcalendar/core": "^4.3.1",
"@fullcalendar/daygrid": "^4.3.0",
"@fullcalendar/interaction": "^4.3.0",
"@fullcalendar/list": "^4.3.0",
"@fullcalendar/moment": "^4.3.0",
"@fullcalendar/timegrid": "^4.3.0",
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
`ReferenceError: Element is not defined` when running mocha ...
onsenui seems to be written for a browser enviroment, whilst you're executing it in a nodejs enviroment. Element is a DOM api. nodejs...
Read more >ReferenceError: Element is not defined · Issue #6610 - GitHub
The issue is that rollup removes unused code. It considers adding const Element = typeof Element === "undefined" ? function () {} :...
Read more >ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
ReferenceError : "x" is not defined. The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >React UIKit v3 error - ReferenceError: Element is not defined
Hello, I'm upgrading React UIKit from v2 to v3 and got an error message ReferenceError: Element is not defined.
Read more >ReferenceError: Element is not defined` when running mocha ...
onsenui seems to be written for a browser enviroment, whilst you're executing it in a nodejs enviroment. Element is a DOM api. nodejs...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry for the delay in responding to your issue, I have just begun triaging on this repo.
I believe this existing ticket captures this need: https://github.com/fullcalendar/fullcalendar/issues/4784 ↑ Please visit the above issue, give a 👍 to vote (?), press the 🔈Subscribe button to receive updates.
If there is another issue, please post a runnable, stripped-down demonstration.
Hi @acerix I tried your code in server.ts but still the same error. See the error in the Screenshot https://prnt.sc/11kp43c
Temporary I fix it remove the element code from main.js but whenever again I create SSR build it arises again.