Asindu
Asindu
CDCloudflare Developers
Created by Asindu on 2/28/2024 in #pages-help
Custom Domain for Cloudflare Pages Not Working
Hi, I recently added a custom domain https://ficcabs.com/ to Cloudflare Pages. Unfortunately, the page doesn’t work when loaded in a browser. I get the old Namecheap domain parking page or an error from Cloudflare, sometimes something does not load at all. I have already tried purging the DNS. DNS lookups show that the custom DNS servers are properly set up by the domain register. However, the CNAME I configured doesn’t show up. The strange thing is that if I turn on the Cloudflare VPN (WARP). The https://ficcabs.com/ domain works as expected. How do I resolve this issue? It has been like this for close to 10 hours even development mode doesn’t solve the issue. My pages.dev - https://ficcabs.pages.dev/ AccountID - a8b354c0c51e08c70d85e297901f5900
4 replies
CDCloudflare Developers
Created by Asindu on 1/31/2024 in #pages-help
Server Side Rendering of templates Cloudflare Pages without ‘node:fs’
Hi guys, I am trying to get a templating setup, using Mustache. Mustache however to render files on the server side requires the use of node:fs core module. Workers, however, is limited in what node modules it can support, according to - https://github.com/cloudflare/workers-sdk/issues/3430#issuecomment-1589351536. So Mustache templates cannot be read on the server side using node:fs Here is my problem, I want to have several HTML templates & partials, in many separate files that I want to render on the server side (using workers). Then send it to the front end. So, two questions. a) Is there a workaround/hack allowing me to use Mustache for server-side rendering template files? b) Can an alternative library/stack or technique help me achieve my goal?
4 replies
CDCloudflare Developers
Created by Asindu on 1/31/2024 in #pages-help
Uncaught ReferenceError: HTMLElement is not defined
I am trying to do Server Side Rendering using import {render} from '@lit-labs/ssr'; and import {html} from 'lit'; I am doing this by importing the libraries inside the /functions folder. But I get the error below.
✘ [ERROR] service core:user:start-project: Uncaught ReferenceError: HTMLElement is not defined

at null.<anonymous> (functionsWorker-0.2806522561602802.js:152:9)


✘ [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
✘ [ERROR] service core:user:start-project: Uncaught ReferenceError: HTMLElement is not defined

at null.<anonymous> (functionsWorker-0.2806522561602802.js:152:9)


✘ [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
What could be the problem?
2 replies