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

support for deno serverside rendering #6336

Open
1 task
kesavkolla opened this issue Sep 10, 2024 · 2 comments
Open
1 task

support for deno serverside rendering #6336

kesavkolla opened this issue Sep 10, 2024 · 2 comments
Labels

Comments

@kesavkolla
Copy link

kesavkolla commented Sep 10, 2024

Is your feature request related to a problem?

No

Describe the solution you'd like

I want to use ui5 components from server side rendering of Deno and fresh framework. Currently when I try to start the project after installing the npm modules the server fail to start.

It is failing at 3rd party library zxing with the following error:

error: Uncaught (in promise) ReferenceError: window is not defined
    at Object.<anonymous> (file:///home/kesav/.cache/deno/npm/registry.npmjs.org/@zxing/library/0.17.1/umd/index.min.js:1:445)
    at Object.<anonymous> (file:///home/kesav/.cache/deno/npm/registry.npmjs.org/@zxing/library/0.17.1/umd/index.min.js:3:4)
    at Module._compile (node:module:736:34)
    at Object.Module._extensions..js (node:module:757:11)
    at Module.load (node:module:655:32)
    at Function.Module._load (node:module:523:13)
    at Module.require (node:module:674:19)
    at require (node:module:801:16)
    at file:///home/kesav/.cache/deno/npm/registry.npmjs.org/@zxing/library/0.17.1/umd/index.min.js:3:13
Watcher Process failed. Restarting on file change...

Is there anyway to exclude the components that are not needed so that we don't get these kind of failures.

Describe alternatives you've considered

No response

Additional Context

deno version: 1.46.3
fresh framework version: 2.0.0-alpha.20
react framework: preact

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.
@kesavkolla kesavkolla added the feature-request New feature or request label Sep 10, 2024
@kesavkolla
Copy link
Author

When I tried import this from esm.sh I get the following error:

error: Uncaught (in promise) TypeError: Import 'https://esm.sh/v135/@ui5/[email protected]/denonext/dist/ssr-dom.js' failed: 500 Internal Server Error
    at https://esm.sh/v135/@ui5/[email protected]/denonext/dist/UI5Element.js:2:7
      const mod = await options.loadRoute(routePath);
                  ^
    at async https://jsr.io/@fresh/core/2.0.0-alpha.20/src/plugins/fs_routes/mod.ts:125:19
    at async Promise.all (index 2)
    at async fsRoutes (https://jsr.io/@fresh/core/2.0.0-alpha.20/src/plugins/fs_routes/mod.ts:123:48)

@MarcusNotheis
Copy link
Contributor

Hi @kesavkolla,
thanks for reaching out - I think at the end of the day the error comes down to this upstream dependency issue in UI5 Web Components: SAP/ui5-webcomponents#9771
As soon as this is fixed and released, we should be already pretty close to supporting SSR in Deno :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants