Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📚 - dependency highlightjs-line-numbers.js throws SSR error ReferenceError: window is not defined #2836

Closed
2 of 9 tasks
nsbarsukov opened this issue Oct 7, 2022 · 0 comments · Fixed by #3404
Closed
2 of 9 tasks
Assignees
Labels
P3 This issue has low priority

Comments

@nsbarsukov
Copy link
Member

What is the affected URL?

/getting-started

Description

  1. Run nx serve-ssr
  2. Open http://localhost:4200/getting-started
  3. See Node.js console:
[HLJS]  ReferenceError: window is not defined
    at Object.52013 (/Users/n.barsukov/WebstormProjects/taiga-ui/dist/demo/server/52013.js:354:4)
    at __webpack_require__ (/Users/n.barsukov/WebstormProjects/taiga-ui/dist/demo/server/main.js:280663:42)
    at Function.__webpack_require__.t (/Users/n.barsukov/WebstormProjects/taiga-ui/dist/demo/server/main.js:280699:38)
    at _ZoneDelegate.invoke (/Users/n.barsukov/WebstormProjects/taiga-ui/dist/demo/server/main.js:202914:26)
    at Object.onInvoke (/Users/n.barsukov/WebstormProjects/taiga-ui/dist/demo/server/main.js:80705:33)
    at _ZoneDelegate.invoke (/Users/n.barsukov/WebstormProjects/taiga-ui/dist/demo/server/main.js:202913:52)
    at Zone.run (/Users/n.barsukov/WebstormProjects/taiga-ui/dist/demo/server/main.js:202676:43)
    at /Users/n.barsukov/WebstormProjects/taiga-ui/dist/demo/server/main.js:203748:36
    at _ZoneDelegate.invokeTask (/Users/n.barsukov/WebstormProjects/taiga-ui/dist/demo/server/main.js:202948:31)
    at Object.onInvokeTask (/Users/n.barsukov/WebstormProjects/taiga-ui/dist/demo/server/main.js:80692:33)

File /dist/demo/server/52013.js contains ./node_modules/highlightjs-line-numbers.js/src/highlightjs-line-numbers.js. So, probably, error appears in this library highlightjs-line-numbers.js.

Possibly connected issues:

This repository does not look actively maintained.
Probably, we should contribute / find local workaround (or find new library alternative).

Which browsers have you used?

  • Chrome
  • Firefox
  • Safari
  • Edge

Which operating systems have you used?

  • macOS
  • Windows
  • Linux
  • iOS
  • Android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 This issue has low priority
Development

Successfully merging a pull request may close this issue.

1 participant