helia-examples
helia-examples copied to clipboard
feat: new example, helia-angular
To help some Angular devs who want to use Helia, it would be great if we had an example showing a basic Helia example using Angular framework.
To create: re-use an existing example and just modify to use Angular instead.
@SgtPooki I will work on this tonight :)
Hello there! I would like to work on this issue if its still open? Kindly update. 😊
Hello there! I would like to work on this issue if its still open? Kindly update. 😊
Yeah, sure. Let's work on it together. I have created a PR (https://github.com/ipfs-examples/helia-examples/pull/309) but some test keeps failing when you run ng test. Thank you for your help. 😊
Hello there! I would like to work on this issue if its still open? Kindly update. 😊
Yeah, sure. Let's work on it together. I have created a PR (#309) but some test keeps failing when you run
ng test. Thank you for your help. 😊
Integrating Helia-angular with SSR by intuitively wrapping ngOnInit and isPlatformBrowser was indeed a bold move, however the missing outerHTML setting test seems to be a obstacle.
Thanks for the response, I shall get back to you with my update.
Hello there! I would like to work on this issue if its still open? Kindly update. 😊
Yeah, sure. Let's work on it together. I have created a PR (#309) but some test keeps failing when you run
ng test. Thank you for your help. 😊Integrating Helia-angular with SSR by intuitively wrapping
ngOnInitandisPlatformBrowserwas indeed a bold move, however themissing outerHTML settingtest seems to be a obstacle.Thanks for the response, I shall get back to you with my update.
Thanks :) I will be waiting for your update.
Hey @paschal533 , As concluded, Its working perfectly fine in angular-csr. However, facing this err constantly with angular-ssr enabled--
Error: Cannot find module '../../package.json'
Require stack:
- F:\Helia\helia-examples\examples\helia-angular\.angular\prerender-root\d591a9ff-9627-423e-b15b-8419393814b8\main.server.mjs
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at file:///F:/Helia/helia-examples/examples/helia-angular/.angular/prerender-root/d591a9ff-9627-423e-b15b-8419393814b8/main.server.mjs:219:8007
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async importModuleDynamicallyWrapper (node:internal/vm/module:431:15)
at async extractRoutes (F:\Helia\helia-examples\examples\helia-angular\node_modules\@angular\build\src\utils\server-rendering\routes-extractor-worker.js:23:83)
at async F:\Helia\helia-examples\node_modules\piscina\dist\worker.js:144:26
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: [email protected]
npm ERR! at location: F:\Helia\helia-examples\examples\helia-angular
Troubleshoot/debugging fixes taken by me so far--
- Webpack plugin---- since Angular bundles modules, and the relative path structure is lost, using a Webpack Plugin to Inline the package.json
- Include
package.jsonin SSR Build--- modifyingangular.jsonto include helia as commonjs dependency--``` "build": { "options": { "allowedCommonJsDependencies": [ "helia" ] } }
Any guidance?
FYI Helia should be fully ESM afaik...
@SgtPooki @paschal533 kindly look into it,
https://github.com/ipfs-examples/helia-examples/pull/425
I have arduously fixed, modified and debugged err and setup helia-angular. 🙂
@SgtPooki @paschal533 kindly look into it,
I have arduously fixed, modified and debugged err and setup helia-angular. 🙂
Well done 🎉, Neha. I will review it in a bit.