#Cloudflare Pages Template index doesn't render correctly

1 messages · Page 1 of 1 (latest)

desert kindle
#

I've just initiated a project with the cloudflare pages template and on the index page the rendering is not including the full DOM.

It appears it's just rendering the _index.tsx page content as the entire html and removing the <html> and <head> sections. I'm not sure if it has to do with the new <Outlet> stuff

barren aurora
#

yeah, noticed this too, just full bugs 🤷‍♂️

barren aurora
#

might be help

upper arrow
blazing reef
#

I just created a project with npx create-remix@latest --template remix-run/remix/templates/vite-cloudflare, dependencies installed via pnpm and I get around 15 errors. e.g.

Error: No route matches URL "/@react-refresh"
Error: No route matches URL "/@vite-plugin-pwa/pwa-entry-point-loaded"
Error: No route matches URL "/@vite-plugin-pwa/pwa-entry-point-loaded",
Error: No route matches URL "/src/main.tsx"

I also get a warning Failed to resolve dependency: @remix-run/node, present in 'optimizeDeps.include', but I'd assume I wouldn't need that as I don't want to run with node?

upper arrow
#

@blazing reef can you share a repro in stackblitz?

blazing reef
#

Will set one up

#

I did notice that the PR above seems to have changes not in my template (I ran command about 10 mins ago so figured it'd be there). Although that seems to be for non vite templates

blazing reef
#

I cannot seem to get it working in stackblitz (haven't used it before sorry), I get /home/projects/node-9z3vhv/node_modules/.pnpm/@[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd: line 20: a command can only contain words and redirects. However, if you copy the exact template from the remix repo, run pnpm i or yarn, then pnpm | yarn dev then it breaks

upper arrow
#

When running with pnpm, I do see Failed to resolve dependency: @remix-run/node, present in 'optimizeDeps.include, but everything else is error free and works

#

not seeing the "No route matches URL" stuff

#

specifically, running pnpm dlx create-remix@latest --template remix-run/remix/templates/vite-cloudflare and then pnpm dev

blazing reef
#

Hmm, just tried on another computer and it works. So must be something odd with my machine, sorry! Will investigate