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

docs(start): update cloudflare-pages deployment instructions #2744

Merged
merged 4 commits into from
Nov 18, 2024

Conversation

xstevenyung
Copy link
Contributor

@xstevenyung xstevenyung commented Nov 13, 2024

it seems like nitro and therefore vinxi rely on node:async_context to run. while cloudflare doesn't have support for the required API to make this work. the nitro team has started working on this on their package unenv in tacked this issue

until this is integrated in nitro, we need to manually point to the latest version of unenv in the app.config.ts:

import { defineConfig } from "@tanstack/start/config";
import { cloudflare } from "unenv";

export default defineConfig({
  server: {
    preset: "cloudflare-pages",
    unenv: cloudflare,
  },
});

i've updated the hosting documentation to include this and also remove the build command that was attached as it's not possible to pass an unenv via the CLI

related issues:
nitrojs/nitro#1943
solidjs/solid-start#1527
#2633 (comment)

@Talent30
Copy link

Hi @SeanCassiere. Could you review this change once you have time please?

Copy link
Member

@SeanCassiere SeanCassiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested these changes on my personal project and can confirm that these changes fixes the deployment.

docs/framework/react/start/hosting.md Outdated Show resolved Hide resolved
docs/framework/react/start/hosting.md Outdated Show resolved Hide resolved
@SeanCassiere SeanCassiere changed the title update cloudflare deploy documentation to use unenv preset docs(start): update cloudflare-pages deployment instructions Nov 18, 2024
Copy link

nx-cloud bot commented Nov 18, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 7163162. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@SeanCassiere SeanCassiere linked an issue Nov 18, 2024 that may be closed by this pull request
Copy link

pkg-pr-new bot commented Nov 18, 2024

Open in Stackblitz

More templates

@tanstack/arktype-adapter

pnpm add https://pkg.pr.new/@tanstack/arktype-adapter@2744

@tanstack/create-router

pnpm add https://pkg.pr.new/@tanstack/create-router@2744

@tanstack/history

pnpm add https://pkg.pr.new/@tanstack/history@2744

@tanstack/eslint-plugin-router

pnpm add https://pkg.pr.new/@tanstack/eslint-plugin-router@2744

@tanstack/react-cross-context

pnpm add https://pkg.pr.new/@tanstack/react-cross-context@2744

@tanstack/react-router

pnpm add https://pkg.pr.new/@tanstack/react-router@2744

@tanstack/react-router-with-query

pnpm add https://pkg.pr.new/@tanstack/react-router-with-query@2744

@tanstack/router-cli

pnpm add https://pkg.pr.new/@tanstack/router-cli@2744

@tanstack/router-devtools

pnpm add https://pkg.pr.new/@tanstack/router-devtools@2744

@tanstack/router-generator

pnpm add https://pkg.pr.new/@tanstack/router-generator@2744

@tanstack/router-plugin

pnpm add https://pkg.pr.new/@tanstack/router-plugin@2744

@tanstack/router-vite-plugin

pnpm add https://pkg.pr.new/@tanstack/router-vite-plugin@2744

@tanstack/start

pnpm add https://pkg.pr.new/@tanstack/start@2744

@tanstack/start-vite-plugin

pnpm add https://pkg.pr.new/@tanstack/start-vite-plugin@2744

@tanstack/valibot-adapter

pnpm add https://pkg.pr.new/@tanstack/valibot-adapter@2744

@tanstack/virtual-file-routes

pnpm add https://pkg.pr.new/@tanstack/virtual-file-routes@2744

@tanstack/zod-adapter

pnpm add https://pkg.pr.new/@tanstack/zod-adapter@2744

commit: 7163162

@SeanCassiere SeanCassiere merged commit 8299698 into TanStack:main Nov 18, 2024
5 checks passed
@SeanCassiere
Copy link
Member

Thank you for this contribution @xstevenyung! Also, thanks to @Talent30 for bringing this to my attention.

timoconnellaus pushed a commit to timoconnellaus/tanstack-router that referenced this pull request Dec 4, 2024
…ack#2744)

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

server function calls not working on Cloudflare
3 participants