Nick
Nick
Explore posts from servers
CDCloudflare Developers
Created by Nick on 5/13/2024 in #general-help
Tracking script failing on deployment
I'm trying to add this tracking script to my site, but it's failing on deployment with the error (and many others that follow it):
src/layouts/main-layout.astro:32:917 - error ts(2304): Cannot find name 'd'.
they all point to the script. Looks like a typescript error, but I'm not really sure what to do with it?
<!-- <script>window.faitracker=window.faitracker||function(){this.q=[];var t=new CustomEvent("FAITRACKER_QUEUED_EVENT");return this.init=function(t,e,a){this.TOKEN=t,this.INIT_PARAMS=e,this.INIT_CALLBACK=a,window.dispatchEvent(new CustomEvent("FAITRACKER_INIT_EVENT"))},this.call=function(){var e={k:"",a:[]};if(arguments&&arguments.length>=1){for(var a=1;a<arguments.length;a++)e.a.push(arguments[a]);e.k=arguments[0]}this.q.push(e),window.dispatchEvent(t)},this.message=function(){window.addEventListener("message",function(t){"faitracker"===t.data.origin&&this.call("message",t.data.type,t.data.message)})},this.message(),this.init("key",{host:"https://api.factors.ai"}),this}(),function(){var t=document.createElement("script");t.type="text/javascript",t.src="https://app.factors.ai/assets/factors.js",t.async=!0,(d=document.getElementsByTagName("script")[0]).parentNode.insertBefore(t,d)}();</script> -->
<!-- <script>window.faitracker=window.faitracker||function(){this.q=[];var t=new CustomEvent("FAITRACKER_QUEUED_EVENT");return this.init=function(t,e,a){this.TOKEN=t,this.INIT_PARAMS=e,this.INIT_CALLBACK=a,window.dispatchEvent(new CustomEvent("FAITRACKER_INIT_EVENT"))},this.call=function(){var e={k:"",a:[]};if(arguments&&arguments.length>=1){for(var a=1;a<arguments.length;a++)e.a.push(arguments[a]);e.k=arguments[0]}this.q.push(e),window.dispatchEvent(t)},this.message=function(){window.addEventListener("message",function(t){"faitracker"===t.data.origin&&this.call("message",t.data.type,t.data.message)})},this.message(),this.init("key",{host:"https://api.factors.ai"}),this}(),function(){var t=document.createElement("script");t.type="text/javascript",t.src="https://app.factors.ai/assets/factors.js",t.async=!0,(d=document.getElementsByTagName("script")[0]).parentNode.insertBefore(t,d)}();</script> -->
1 replies
CDCloudflare Developers
Created by Nick on 4/28/2024 in #general-help
Moving site + emails to Cloudflare pages (from Digital Ocean)
Hey all, anyone know of any good resources for transferring a site (and more importantly email) from digital ocean to cloudflare? Just looking for a checklist more than a handhold, but it is important that emails are working tomorrow, so I'd take the handhold 😄 I'm thinking: MX records -> point to x.mail.protection.outlook TXT for dmarc 2 CNAMES for DKIM pointing to MS An external dns for o365 eg: MS=ms93647839 A CNAME for o365 autodiscover An spf txt CNAMES for sendgrid A records and NS I've currently got the records in DO afaik, is there anything above I've missed, or anything that might change based on the fact that I'm moving from DO to CF? Email registrar is GoDaddy. Appreciate it **also happy to be told I shouldn't do it
4 replies
CDCloudflare Developers
Created by Nick on 4/26/2024 in #general-help
Pages: Failed to publish your Function.
Hi all, just getting this error when trying to deploy an astro ssr (with the cloudflare integration):
Error: Failed to publish your Function. Got error: Uncaught Error: No such module "chunks/prerender_BU2rOQkH.mjs". imported from "renderers.mjs"
I'm not going to lie, I have very little idea where to start or what it's actually complaining about. Would appreciate some advice! *edit: The log in case it helps:
05:44:36.224 ✨ Compiled Worker successfully 05:44:36.272 Found _routes.json in output directory. Uploading. 05:44:36.291 Validating asset output directory 05:44:37.259 Deploying your site to Cloudflare's global network... 05:44:40.757 Uploading... (44/44) 05:44:40.758 ✨ Success! Uploaded 0 files (44 already uploaded) (0.34 sec) 05:44:40.758
05:44:41.187 ✨ Upload complete! 05:44:44.175 Success: Assets published! 05:44:45.813 Error: Failed to publish your Function. Got error: Uncaught Error: No such module "chunks/prerender_BU2rOQkH.mjs". imported from "renderers.mjs"
11 replies
CDCloudflare Developers
Created by Nick on 4/21/2024 in #general-help
Multiple Turnstile widgets on a page
I was just wondering why it would be necessary to have multiple turnstile widgets on a page? Could I have one, and for every form I just get the widget's state? Or does the problem become when you need to render the widget - you need it to be near the form? I was just thinking if it would be possible to have one widget, and then FLIP or rerender that widget into a portal/modal? Thanks, Nick
1 replies
CDCloudflare Developers
Created by Nick on 4/17/2024 in #general-help
Restricting worker access?
Hi, is it possible to restrict the domain that workers are called from?
6 replies
CDCloudflare Developers
Created by Nick on 3/25/2024 in #general-help
Is it possible to run Mailgun/Sendgrid/a package that needs node in Cloudflare workers?
Hi, I've just uploaded my first site to pages, and then found out that my API Route (astro ssr) was assuming a node environment. It's only there to use Mailgun or Sendrid, but both seem to need node. Is there any work around here? Thanks, Nick
4 replies