Coder Social home page Coder Social logo

timothymiller / t4-app Goto Github PK

View Code? Open in Web Editor NEW
1.1K 14.0 61.0 40.52 MB

A powerful cross-platform UI toolkit for building actually native iOS, Android, macOS, Windows, Linux, and Progressive Web Apps with React (Native).

Home Page: https://t4stack.com

License: MIT License

JavaScript 7.66% TypeScript 92.34%
tamagui trpc typescript cli cloudflare nextjs react react-native react-native-web serverless

t4-app's Introduction

Logo of Create T4 App

create-t4-app

Interactive CLI to start a full-stack, typesafe, universal Expo & Next.js app on Cloudflare's edge platform.

Get started with the T4 Stack by running bun create t4-app

Join the T4 discord community ย  Weekly downloads for create-t4-app on npmjs.org ย  VSCode Extension Installs

๐Ÿ” The T4 Stack

The T4 Stack is a universal web and native stack made by Tim Miller focused on developer experience, rapid development, and performance.

Easy integration with Cloudflare services, such as R2 & D1 enable developers to build apps with AI-powered features at a lower cost compared to AWS.

Ship it today and witness 6 second package install times & 30 second backend deployments.

๐Ÿ‘‰ Further documentation can be found on the T4 Stack website. ๐Ÿ‘ˆ


T4 is compatible with Cloudflare Pages ย  T4 uses Next.js ย  T4 uses Expo ย  T4 is written in TypeScript

๐Ÿ“ UI Kit

๐Ÿ”ฎ Frontend

๐Ÿ“ก Data Fetching

๐Ÿ“ˆ Performance Improvements

  • ๐Ÿ’จ Million.js
    • Virtual DOM replacement for React
    • Achieve SolidJS-like performance with React
  • ๐ŸŽ‚ PattyCake
    • Zero-runtime pattern matching with ts-pattern

โœ… Type Validation

๐Ÿงญ Router

๐Ÿข Global State Management

โš™๏ธ Backend

๐Ÿ”’ Authentication

๐Ÿ“– Background

T4 is a project starter kit for building type-safe, native & web applications in TypeScript using Tamagui, tRPC, and Tauri. Deploy to Cloudflare for a global edge network. All at a fraction of the cost of AWS, Vercel, or Azure.

It provides a unified, opinionated, & minimalistic setup for quickly getting started with building native & web apps, using the same code, without having to worry about the complexities of setting up a development environment.

๐Ÿ’ช Build Apps for All Platforms

  • ๐Ÿ“ฑ iOS
  • ๐Ÿค– Android
  • ๐Ÿ•ธ๏ธ Web
    • Progressive Web App (PWA) support
    • ๐Ÿ’ป macOS
    • ๐ŸชŸ Windows
    • ๐Ÿง Linux
  • ๐Ÿงช (Experimental) Desktop support via Tauri

Build native apps for iOS, Android, macOS, Windows, and Linux using the same codebase.

Never worry about using XCode or Android Studio again

Android Studio ย  XCode

๐Ÿš€ Quick Start

Basic Setup

bun v1.0 is required to use create-t4-app

bun is required to use `create-t4-app`

To scaffold an app using create-t4-app, run any of the following commands.

bun

bun create t4-app

Tauri

If you would like to use Tauri use:

bun create t4-app --tauri

โ“ Why T4?

T4 is the result of extensive research and testing to identify the best libraries for React Native and Web development. We've done the hard work for you, so you can focus on building amazing apps without worrying about performance bottlenecks.

Whether you're developing a mobile app with React Native or a web app using React, T4 is the perfect choice. Our template is designed to seamlessly integrate with your existing projects, making it easy to enhance performance without starting from scratch.

๐Ÿš… Performance

  • ๐Ÿ‘‰ 6 second package install time

  • ๐Ÿ‘‰ 30 second backend deployments

  • ๐Ÿ‘‰ 90 second frontend deployments

  • Small learning curve

  • Instant feedback, rapid development

  • Universal across React Native & React Web

  • High code re-use

  • Low bundle size

  • Edge compatible

  • Fast startup time

  • Simple setup

  • Allows for platform-specific code when needed.

๐Ÿ“ฆ What's Included

  • Tamagui - A UI kit for building beautiful and responsive user interfaces.
  • TanStack - High-quality open-source software for React developers.
  • tRPC - A TypeScript framework for building end-to-end typesafe APIs.
  • TypeScript - A typed superset of JavaScript that compiles to plain JavaScript.

๐Ÿงฉ VSCode Extension

The VSCode extension is optional but highly recommended. It provides a better developer experience by providing code actions to help you scaffold your app. You can find more info in the docs or install it from the VSCode Marketplace.

โœจ Features

  • โœ… 6 second package install time
  • โœ… 30 second backend deployments
  • โœ… 90 second frontend deployments
  • โœ… Tamagui UI kit across all platforms.
  • โœ… Bun support
  • โœ… Million.js Support
  • โœ… PattyCake Support
  • โœ… Valibot Support
  • โœ… Generate Valibot Type Guards from your Drizzle Schema
  • โœ… Supabase Auth
  • โœ… Uses Next.js for building web apps.
  • โœ… Uses Expo for building native mobile apps.
  • โœ… PWA by default for native desktop support. No Electron required.
  • โœ… Uses Cloudflare Workers for serverless functions.
  • โœ… No Docker containers required.
  • โœ… Uses tRPC & Tanstack Query for fetching & caching across all platforms.
  • โœ… Authentication across all platforms.
  • โœ… Powered by TypeScript for type safety and better developer experience.
  • โœ… Comes with pre-configured Biome for lightning fast code consistency.
  • โœ… Github Action publishing for Expo apps
  • โœ… Database migration in CI/CD
  • โœ… Tauri Support

โญ Wish List

๐Ÿ‘‰ The wish list has moved to the docs website.

๐Ÿ’ฌ Community

For help, discussion about best practices, or any other conversation that would benefit create-t4-app:

Join the T4 Discord Server

๐Ÿซถ Contributors

We welcome contributions from anyone and everyone. Please read our contributing guidelines for more information on how to get started.

๐Ÿ‘ Special Thanks

โ„ข๏ธ Disclaimer

The T4 App is not affiliated with or endorsed by EquipmentShare or T3 app.

โš–๏ธ License

Create T4 App is licensed under the MIT License.

t4-app's People

Contributors

403access avatar akritw avatar albbus-stack avatar coniferconcepts avatar death666machine avatar desttro avatar dozken avatar hmbrg avatar honeydreamssoftwares avatar hrdtr avatar j3sch avatar janwirth avatar kewinzaq1 avatar lakeesiv avatar rmarscher avatar rosswaycaster avatar stillmatic avatar swissnp avatar tim-apps avatar timothymiller avatar wezter96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

t4-app's Issues

[native] Wasnโ€™t able to get the pressStyle working in IOS simulator

I was not able to configure any pressStyles in tamagui, for example the code from https://tamagui.dev/docs/core/animations#react-native-animated

import { LogoIcon } from '@tamagui/logo'

import { Play } from '@tamagui/lucide-icons'

import { Button, Square, useControllableState, useEvent } from 'tamagui'
export function AnimationsDemo(props) {

  const [positionI, setPositionI] = useControllableState({

    strategy: 'most-recent-wins',

    prop: props.position,

    defaultProp: 0,

  })

  const position = positions[positionI]

  const onPress = useEvent(() => {

    setPositionI((x) => {

      return (x + 1) % positions.length

    })

  })
  return (

    <>

      <Square
        animation={props.animation || 'bouncy'}
        animateOnly={['transform']}
        onPress={onPress}
        size={104}
        borderColor="$borderColor"
        borderWidth={1}
        borderRadius="$9"
        backgroundColor="$color9"
        hoverStyle={{
          scale: 1.5,
        }}
        pressStyle={{
          scale: 0.9,
        }}
        {...position}
      >

        {props.children || <LogoIcon downscale={0.75} />}

      </Square>
      <Button
        position="absolute"
        bottom={20}
        left={20}
        icon={Play}
        theme={props.tint}
        size="$5"
        circular
        onPress={onPress}
      />

    </>

  )

}
export const positions = [

  {

    x: 0,

    y: 0,

    scale: 1,

    rotate: '0deg',

  },

  {

    x: -50,

    y: -50,

    scale: 0.5,

    rotate: '-45deg',

    hoverStyle: {

      scale: 0.6,

    },

    pressStyle: {

      scale: 0.4,

    },

  },

  {

    x: 50,

    y: 50,

    scale: 1,

    rotate: '180deg',

    hoverStyle: {

      scale: 1.1,

    },

    pressStyle: {

      scale: 0.9,

    },

  },

]

The following

pressStyle: {
      scale: 0.9,
    },

isn't working for me when I click and hold on the IOS simulator, but it works perfectly in web.

Tamagui: unable to launch web app

โžœ t4-app git:(main) โœ— bun run web
$ cd apps/next && bun run dev
$ bun with-env next dev
$ dotenv -e ../../.env.local -- next dev
โ—‹ (pwa) PWA support is disabled.
โ—‹ (pwa) PWA support is disabled.
โ–ฒ Next.js 13.5.6

  • Local: http://localhost:3000
  • Environments: .env
  • Experiments (use at your own risk):
    ยท scrollRestoration
    ยท forceSwcTransforms

โœ“ Ready in 6.6s
โ—‹ Compiling / ...

โžก [tamagui] built config and components (3001ms):

    Config     ./.tamagui/tamagui.config.cjs
    Components ./.tamagui/tamagui-components.config.cjs
         ./.tamagui/t4ui-components.config.cjs

โš ๏ธ Tamagui Warning [001]: Skipping loading /t4-app/apps/next/.tamagui/tamagui.config.cjs due to error bundling.

โš ๏ธ Tamagui Warning [001]: Skipping loading /t4-app/apps/next/.tamagui/tamagui-components.config.cjs due to error bundling.

โš ๏ธ Tamagui Warning [001]: Skipping loading /t4-app/apps/next/.tamagui/t4ui-components.config.cjs due to error bundling.

Missing theme, an error occurred when importing your config
Got config: [Function (anonymous)] {
displayName: 'ProxyWorm - Check excludeReactNativeWebExports',
_isProxyWorm: true
}
Looking for theme: displayName

NextJs env variables missing in .env.example for localhost (vs PUBLIC_ variables)

Current .env.example use PUBLIC_ variables for configuration.
In localhost dev, if we use only these variables, then supabase doesn't work, and images are broken.

# ๐Ÿ›Ž๏ธ For local dev
# ๐Ÿ‘‰ Rename this file to .env.local
# ๐Ÿ‘‰ Fill in the values below.

# Expo & Next.js)
PUBLIC_API_URL=http://localhost:8787
PUBLIC_APP_URL=http://localhost:3000
PUBLIC_SUPABASE_ANON_KEY=
PUBLIC_SUPABASE_URL=
PUBLIC_SUPPORT_EMAIL=
PUBLIC_METADATA_NAME="T4 App"
PUBLIC_METADATA_DESCRIPTION="Type-Safe, Full-Stack Starter Kit for React Native + Web."
PUBLIC_EAS_OWNER="timothymiller"
PUBLIC_EAS_PROJECT_ID="85fc6ccd-0ce1-4e4d-804c-b15df989f97e"

# Cloudflare Wrangler
JWT_VERIFICATION_KEY=
DATABASE_ID=aa5e3923-0f1b-469a-8bb8-d10fb866efe0

Had to add this to my .env.local (as per documentation):

# For backwards compatibility
NEXT_PUBLIC_API_URL=http://localhost:8787
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_SUPABASE_URL=xxxx
NEXT_PUBLIC_SUPABASE_ANON_KEY=xxxx
NEXT_PUBLIC_SUPPORT_EMAIL=xxxx

Thanks, great project, love it.

Lucia branch: Suggestion: When pw reset code is invalid, show this error as soon as the site loads, don't wait until user tries to enter a new pw

If a user clicks on an outdated/already-used password reset link (in the email they get after requesting a pw reset), the frontend (on https://<domain>/password-reset/update-password?code=<code>&email=<email>) first behaves as if this pw reset link is still valid. In other words, it shows no error, until the user enters a new pw and clicks "Change password".
Only then it shows a toast with this message:

message: `There are no active verification codes where ${providerId} is ${providerUserId}`,

Suggestion: When the pw reset code is invalid, show this error as soon as the site loads.


Btw: The pw reset email also contains the code on a separate line as the pw reset link, but it's irrelevant to the user because the user is never/nowhere asked to enter this code!
To make it less confusing to the user, we could remove the code from the email. (Considering the the link in the email already contains this code in a query param.)

(And then, we could add a non linkified version of the pw reset URL on a separate line with something like "If the link above doesn't work, enter this URL manually in your browser's address bar".)

supabaseUrl is required

Hello, I cant seem to get around the error supabaseUrl is required issue besides setting it manually in the client.ts.

Are we missing docs on this or am I missing something?

Thanks!

mutations return data: null

Hello, I wanted to use the endpoint create under user.

I have added a button on the homePage. When I click the button, the following code will be executed.

const createUser = trpc.user.create.useMutation()

const handleCreateUser = async () => {
    if (!user?.email) {
      toast.show('Please sign in first')
      return
    }

    createUser.mutate(
      {
        email: user.email,
        id: user.id,
      },
      {
        onSuccess: (res: any) => {
          console.log('res', res)
        },
      }
    )
  }

In my browser console I can see that the req was successful, but data from the res is null and I don't see any console.logs in my terminal.

image

Thanks for your help!

[feature-request] Add tauri support for native desktop

Hey, loving the project, I actually found it in the t3/cua createuniversalapp discord about t4, and that's where they recently landed tauri.

Wondering if it would be nice to bring tauri also inside the nextjs app into the t4 stack?

Tamagui web error: `Looking for theme: displayName`

โžก [tamagui] built config and components (377ms):

    Config     ./.tamagui/tamagui.config.cjs
    Components ./.tamagui/tamagui-components.config.cjs
         ./.tamagui/t4ui-components.config.cjs

Tamagui failed loading "/Users//dev/tamago/apps/next/.tamagui/tamagui.config.cjs"

Cannot read properties of undefined (reading 'Stack')
TypeError: Cannot read properties of undefined (reading 'Stack')
at Object. (/Users//dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:16:26)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._compile (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:2258:26)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Object.newLoader (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
at extensions..js (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:4838:24)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at /Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:88
at requireTamaguiCore (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/helpers/requireTamaguiCore.js:23:10)
at Module.tamaguiRequire [as require] (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:63)
at require (node:internal/modules/helpers:176:18)
at ../../node_modules/@tamagui/animate-presence/dist/cjs/AnimatePresence.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui.config.cjs:316:24)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui.config.cjs:12:50)
at ../../node_modules/@tamagui/animate-presence/dist/cjs/index.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui.config.cjs:476:31)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui.config.cjs:12:50)
at ../../node_modules/@tamagui/collapsible/dist/cjs/Collapsible.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui.config.cjs:700:36)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui.config.cjs:12:50)
at ../../node_modules/@tamagui/collapsible/dist/cjs/index.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui.config.cjs:808:31)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui.config.cjs:12:50)
at ../../node_modules/@tamagui/accordion/dist/cjs/Accordion.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui.config.cjs:1917:30)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui.config.cjs:12:50)
at ../../node_modules/@tamagui/accordion/dist/cjs/index.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui.config.cjs:2237:31)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui.config.cjs:12:50)
at Object. (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui.config.cjs:32371:34)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Object.newLoader (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
at extensions..js (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:4838:24)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at Module.tamaguiRequire [as require] (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/registerRequire.js:64:17)
at require (node:internal/modules/helpers:176:18)
at bundleConfig (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/bundleConfig.js:119:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async getBundledConfig (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/bundleConfig.js:61:12)
at async loadTamagui (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/loadTamagui.js:42:57)
at async load (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/createExtractor.js:69:60)
at async Object.parse (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/createExtractor.js:86:28)
at async extractToClassNames (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/extractToClassNames.js:62:15)
at async Object.loader (/Users/ssddd/dev/tamago/node_modules/tamagui-loader/dist/cjs/loader.js:53:73)

Tamagui failed loading "/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs"

Cannot read properties of undefined (reading 'Stack')
TypeError: Cannot read properties of undefined (reading 'Stack')
at Object. (/Users/ssddd/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:16:26)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._compile (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:2258:26)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at newLoader (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
at Object.newLoader (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
at extensions..js (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:4838:24)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at /Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:88
at requireTamaguiCore (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/helpers/requireTamaguiCore.js:23:10)
at Module.tamaguiRequire [as require] (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:63)
at require (node:internal/modules/helpers:176:18)
at ../../node_modules/@tamagui/animate-presence/dist/cjs/AnimatePresence.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs:316:24)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs:12:50)
at ../../node_modules/@tamagui/animate-presence/dist/cjs/index.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs:476:30)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs:12:50)
at ../../node_modules/@tamagui/collapsible/dist/cjs/Collapsible.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs:700:36)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs:12:50)
at ../../node_modules/@tamagui/collapsible/dist/cjs/index.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs:808:30)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs:12:50)
at ../../node_modules/@tamagui/accordion/dist/cjs/Accordion.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs:1917:30)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs:12:50)
at ../../node_modules/@tamagui/accordion/dist/cjs/index.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs:2237:30)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs:12:50)
at Object. (/Users/ssddd/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs:30728:34)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at newLoader (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
at Object.newLoader (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
at extensions..js (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:4838:24)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at Module.tamaguiRequire [as require] (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/registerRequire.js:64:17)
at require (node:internal/modules/helpers:176:18)
at attemptLoad (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/bundleConfig.js:191:30)
at /Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/bundleConfig.js:206:21
at Array.flatMap ()
at loadComponents (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/bundleConfig.js:167:36)
at bundleConfig (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/bundleConfig.js:128:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async getBundledConfig (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/bundleConfig.js:61:12)
at async loadTamagui (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/loadTamagui.js:42:57)
at async load (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/createExtractor.js:69:60)
at async Object.parse (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/createExtractor.js:86:28)
at async extractToClassNames (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/extractor/extractToClassNames.js:62:15)
at async Object.loader (/Users/ssddd/dev/tamago/node_modules/tamagui-loader/dist/cjs/loader.js:53:73)

Tamagui failed loading "/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs"

Cannot read properties of undefined (reading 'Stack')
TypeError: Cannot read properties of undefined (reading 'Stack')
at Object. (/Users/ssddd/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:16:26)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._compile (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:2258:26)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at newLoader (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
at Object.newLoader (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
at extensions..js (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:4838:24)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at /Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:88
at requireTamaguiCore (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/helpers/requireTamaguiCore.js:23:10)
at Module.tamaguiRequire [as require] (/Users/ssddd/dev/tamago/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:63)
at require (node:internal/modules/helpers:176:18)
at ../../node_modules/@tamagui/animate-presence/dist/cjs/AnimatePresence.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs:316:24)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs:12:50)
at ../../node_modules/@tamagui/animate-presence/dist/cjs/index.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs:476:31)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs:12:50)
at ../../node_modules/@tamagui/collapsible/dist/cjs/Collapsible.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs:700:36)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs:12:50)
at ../../node_modules/@tamagui/collapsible/dist/cjs/index.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs:808:31)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs:12:50)
at ../../node_modules/@tamagui/accordion/dist/cjs/Accordion.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs:1917:30)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs:12:50)
at ../../node_modules/@tamagui/accordion/dist/cjs/index.js (/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs:2237:31)
at __require (/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs:12:50)
at Object. (/Users/ssddd/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs:32365:34)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at newLoader (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
at Object.newLoader (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
at extensions..js (/Users/ssddd/dev/tamago/node_modules/esbuild-register/dist/node.js:4838:24)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at Module.tamaguiRequire [as require] (

Missing theme, an error occurred when importing your config
Got config: [Function (anonymous)] {
displayName: 'ProxyWorm - Check excludeReactNativeWebExports',
_isProxyWorm: true
}
Looking for theme: displayName
Mac OS

VSCode extension should generate component name with PascalCase

When I enter the screen name in t4-app-tools: New Screen with

  • CreateTransaction -- component name generate as createtransaction
  • Create Transaction -- cannot generate
  • create-transaction -- component name generate as create-transaction

I think all input should generate into PascalCase, which is CreateTransaction

CORS error because of autogenerated .dev.vars file

Bun autogenerates the .dev.vars file and overrides the values after every install. It takes the keys and values from the .env.local file.
In the .env.local the keys are named NEXT_PUBLIC_APP_URL, but in the .dev.vars file it must be APP_URL. Therefore I get the error APP_URL is not set. CORS errors may occur. displayed.

Nextjs issues from basic template

Trying to get the most basic template running doing these steps:

  1. Ran pnpm create t4-app@latest test-t4-app
  2. Made a new Supabase project and included its details in my .env and .dev.vars files
  3. Made a new Cloudflare worker with a D1 and included its details in my .dev.vars and wrangler.toml files
  4. Ran bun migrate:local
  5. Ran bun dev

Got this when trying to open localhost:3000 on the latest Chrome browser:

szebert@Szeberts-MBP test-t4-app % bun dev
$ turbo dev --parallel --filter={next-app,@t4/api}
โ€ข Packages in scope: @t4/api, next-app
โ€ข Running dev in 2 packages
โ€ข Remote caching disabled
@t4/api:dev: cache bypass, force executing 7e2a0f5f005d9f10
next-app:dev: cache bypass, force executing 18690528f590b5f3
@t4/api:dev: $ wrangler dev
next-app:dev: $ bun with-env next dev
next-app:dev: $ dotenv -e ../../.env.local -- next dev
@t4/api:dev:  โ›…๏ธ wrangler 3.15.0
@t4/api:dev: -------------------
@t4/api:dev: โ–ฒ [WARNING] Enabling Node.js compatibility mode for built-ins and globals. This is experimental and has serious tradeoffs. Please see https://github.com/ionic-team/rollup-plugin-node-polyfills/ for more details.
@t4/api:dev: 
@t4/api:dev: 
@t4/api:dev: Using vars defined in .dev.vars
@t4/api:dev: Your worker has access to the following bindings:
@t4/api:dev: - D1 Databases:
@t4/api:dev:   - DB: production (9d318023-ad95-4a28-839d-2cfb8dbcbb1e)
@t4/api:dev: - Vars:
@t4/api:dev:   - APP_URL: "(hidden)"
@t4/api:dev:   - JWT_VERIFICATION_KEY: "(hidden)"
@t4/api:dev:   - DATABASE_ID: "(hidden)"
@t4/api:dev: โŽ” Starting local server...
hello
[mf:inf] Ready on http://0.0.0.0:8787
[mf:inf] - http://127.0.0.1:8787
[mf:inf] - http://192.168.1.70:8787
[mf:inf] - http://192.168.1.69:8787
@t4/api:dev: 
next-app:dev:  โ—‹ (pwa) PWA support is disabled.
next-app:dev:  โ—‹ (pwa) PWA support is disabled.
next-app:dev:   โ–ฒ Next.js 13.5.6
next-app:dev:   - Local:        http://localhost:3000
next-app:dev:   - Environments: .env
next-app:dev:   - Experiments (use at your own risk):
next-app:dev:      ยท scrollRestoration
next-app:dev:      ยท forceSwcTransforms
next-app:dev: 
next-app:dev:  โœ“ Ready in 3.9s
next-app:dev: <w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Resolving 'next/dist/compiled/webpack/webpack-lib' in /Users/szebert/CodeProjects/test-t4-app/node_modules/@ducanh2912/next-pwa/dist for build dependencies doesn't lead to expected result '/Users/szebert/CodeProjects/test-t4-app/node_modules/next/dist/compiled/webpack/webpack-lib.js', but to '/Users/szebert/CodeProjects/test-t4-app/node_modules/@ducanh2912/next-pwa/node_modules/next/dist/compiled/webpack/webpack-lib.js' instead. Resolving dependencies are ignored for this path.
next-app:dev: <w>  at unknown 4 next/dist/compiled/webpack/webpack-lib
next-app:dev: <w>  at file dependencies /Users/szebert/CodeProjects/test-t4-app/node_modules/@ducanh2912/next-pwa/dist/index.cjs
next-app:dev: <w>  at file /Users/szebert/CodeProjects/test-t4-app/node_modules/@ducanh2912/next-pwa/dist/index.cjs
next-app:dev: <w>  at file dependencies /Users/szebert/CodeProjects/test-t4-app/apps/next/next.config.js
next-app:dev: <w>  at file /Users/szebert/CodeProjects/test-t4-app/apps/next/next.config.js
next-app:dev: <w>  at resolve commonjs /Users/szebert/CodeProjects/test-t4-app/apps/next/next.config.js
next-app:dev: <w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Resolving 'next/dist/compiled/webpack/webpack-lib' in /Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/next-plugin/dist/cjs for build dependencies doesn't lead to expected result '/Users/szebert/CodeProjects/test-t4-app/node_modules/next/dist/compiled/webpack/webpack-lib.js', but to '/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/next-plugin/node_modules/next/dist/compiled/webpack/webpack-lib.js' instead. Resolving dependencies are ignored for this path.
next-app:dev: <w>  at unknown 4 next/dist/compiled/webpack/webpack-lib
next-app:dev: <w>  at file dependencies /Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/next-plugin/dist/cjs/withTamagui.js
next-app:dev: <w>  at file /Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/next-plugin/dist/cjs/withTamagui.js
next-app:dev: <w>  at file dependencies /Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/next-plugin/dist/cjs/index.js
next-app:dev: <w>  at file /Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/next-plugin/dist/cjs/index.js
next-app:dev: <w>  at file dependencies /Users/szebert/CodeProjects/test-t4-app/apps/next/next.config.js
next-app:dev: <w>  at file /Users/szebert/CodeProjects/test-t4-app/apps/next/next.config.js
next-app:dev: <w>  at resolve commonjs /Users/szebert/CodeProjects/test-t4-app/apps/next/next.config.js
next-app:dev: 
next-app:dev:     โžก [tamagui] built config and components (1388ms):
next-app:dev: 
next-app:dev:         Config     ./.tamagui/tamagui.config.cjs
next-app:dev:         Components ./.tamagui/tamagui-components.config.cjs
next-app:dev:              ./.tamagui/t4ui-components.config.cjs
next-app:dev:         
next-app:dev: Tamagui failed loading "/Users/szebert/CodeProjects/test-t4-app/apps/next/.tamagui/tamagui.config.cjs"
next-app:dev:   
next-app:dev:   Cannot access 'Stack' before initialization
next-app:dev:   ReferenceError: Cannot access 'Stack' before initialization
next-app:dev:     at Object.Stack (/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/core/dist/cjs/index.js:17:16)
next-app:dev:     at Object.get (/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/core/dist/cjs/index.js:11:88)
next-app:dev:     at Object.<anonymous> (/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/core/dist/cjs/index.js:24:26)
next-app:dev:     at Module._compile (node:internal/modules/cjs/loader:1241:14)
next-app:dev:     at Module._compile (/Users/szebert/CodeProjects/test-t4-app/node_modules/esbuild-register/dist/node.js:2258:26)
next-app:dev:     at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
next-app:dev:     at Object.newLoader (/Users/szebert/CodeProjects/test-t4-app/node_modules/esbuild-register/dist/node.js:2262:9)
next-app:dev:     at extensions..js (/Users/szebert/CodeProjects/test-t4-app/node_modules/esbuild-register/dist/node.js:4838:24)
next-app:dev:     at Module.load (node:internal/modules/cjs/loader:1091:32)
next-app:dev:     at Module._load (node:internal/modules/cjs/loader:938:12)
next-app:dev:     at Module.require (node:internal/modules/cjs/loader:1115:19)
next-app:dev:     at mod.require (/Users/szebert/CodeProjects/test-t4-app/node_modules/next/dist/server/require-hook.js:64:28)
next-app:dev:     at /Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:88
next-app:dev:     at requireTamaguiCore (/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/static/dist/cjs/helpers/requireTamaguiCore.js:23:10)
next-app:dev:     at Module.tamaguiRequire [as require] (/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:63)
next-app:dev: 
next-app:dev:   
next-app:dev: Tamagui failed loading "/Users/szebert/CodeProjects/test-t4-app/apps/next/.tamagui/tamagui-components.config.cjs"
next-app:dev:   
next-app:dev:   Cannot access 'Stack' before initialization
next-app:dev:   ReferenceError: Cannot access 'Stack' before initialization
next-app:dev:     at Object.Stack (/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/core/dist/cjs/index.js:17:16)
next-app:dev:     at Object.get (/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/core/dist/cjs/index.js:11:88)
next-app:dev:     at Object.<anonymous> (/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/core/dist/cjs/index.js:24:26)
next-app:dev:     at Module._compile (node:internal/modules/cjs/loader:1241:14)
next-app:dev:     at Module._compile (/Users/szebert/CodeProjects/test-t4-app/node_modules/esbuild-register/dist/node.js:2258:26)
next-app:dev:     at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
next-app:dev:     at newLoader (/Users/szebert/CodeProjects/test-t4-app/node_modules/esbuild-register/dist/node.js:2262:9)
next-app:dev:     at Object.newLoader (/Users/szebert/CodeProjects/test-t4-app/node_modules/esbuild-register/dist/node.js:2262:9)
next-app:dev:     at extensions..js (/Users/szebert/CodeProjects/test-t4-app/node_modules/esbuild-register/dist/node.js:4838:24)
next-app:dev:     at Module.load (node:internal/modules/cjs/loader:1091:32)
next-app:dev:     at Module._load (node:internal/modules/cjs/loader:938:12)
next-app:dev:     at Module.require (node:internal/modules/cjs/loader:1115:19)
next-app:dev:     at mod.require (/Users/szebert/CodeProjects/test-t4-app/node_modules/next/dist/server/require-hook.js:64:28)
next-app:dev:     at /Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:88
next-app:dev:     at requireTamaguiCore (/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/static/dist/cjs/helpers/requireTamaguiCore.js:23:10)
next-app:dev: 
next-app:dev:   
next-app:dev: Tamagui failed loading "/Users/szebert/CodeProjects/test-t4-app/apps/next/.tamagui/t4ui-components.config.cjs"
next-app:dev:   
next-app:dev:   Cannot access 'Stack' before initialization
next-app:dev:   ReferenceError: Cannot access 'Stack' before initialization
next-app:dev:     at Object.Stack (/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/core/dist/cjs/index.js:17:16)
next-app:dev:     at Object.get (/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/core/dist/cjs/index.js:11:88)
next-app:dev:     at Object.<anonymous> (/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/core/dist/cjs/index.js:24:26)
next-app:dev:     at Module._compile (node:internal/modules/cjs/loader:1241:14)
next-app:dev:     at Module._compile (/Users/szebert/CodeProjects/test-t4-app/node_modules/esbuild-register/dist/node.js:2258:26)
next-app:dev:     at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
next-app:dev:     at newLoader (/Users/szebert/CodeProjects/test-t4-app/node_modules/esbuild-register/dist/node.js:2262:9)
next-app:dev:     at Object.newLoader (/Users/szebert/CodeProjects/test-t4-app/node_modules/esbuild-register/dist/node.js:2262:9)
next-app:dev:     at extensions..js (/Users/szebert/CodeProjects/test-t4-app/node_modules/esbuild-register/dist/node.js:4838:24)
next-app:dev:     at Module.load (node:internal/modules/cjs/loader:1091:32)
next-app:dev:     at Module._load (node:internal/modules/cjs/loader:938:12)
next-app:dev:     at Module.require (node:internal/modules/cjs/loader:1115:19)
next-app:dev:     at mod.require (/Users/szebert/CodeProjects/test-t4-app/node_modules/next/dist/server/require-hook.js:64:28)
next-app:dev:     at /Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:88
next-app:dev:     at requireTamaguiCore (/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/static/dist/cjs/helpers/requireTamaguiCore.js:23:10)
next-app:dev: 
next-app:dev:   
next-app:dev: Missing theme, an error occurred when importing your config
next-app:dev: Got config: [Function (anonymous)] {
next-app:dev:   displayName: 'ProxyWorm - Check excludeReactNativeWebExports',
next-app:dev:   _isProxyWorm: true
next-app:dev: }
next-app:dev: Looking for theme: displayName
next-app:dev: 

tRPC not working ion Next.js app

EDIT: This issue was a PEBKAC due to an issue with my chrome browser.

tRPC requests are not working when running the next.js app but are working on the expo app.

On web the trpc.hello.world.useQuery<string>('world') call is returning undefined on the 'Data Fetching' page and there are no TRPC request being logged in the browser network tab so it seems it may be a client-side issue.

Steps to reproduce:

  • Install t4-app
    • bun create t4-app
  • Rename .env.example to .env.local
  • Update .env.local file setting the values for the following env variables:
  • PUBLIC_SUPABASE_ANON_KEY
  • PUBLIC_SUPABASE_URL
  • PUBLIC_SUPPORT_EMAIL
  • bun install
  • Run the api server : bun api
  • In a different terminal start the Next.js app: bun web
  • In the browser go to http://localhost:3000/data-fetching
  • Open up the Network tab
  • Refresh the page
  • Notice that no trpc batch request are made
  • Put a breakpoint on this file in Source tab: packages/app/features/data-fetching/screen.tsx on Line 9 after const helloWorld = trpc.hello.world.useQuery<string>('world')
  • Notice that helloWorld is undefined instead of the useQuery return object of {data: ..., isLoading: ..., isFetched,...}

Run app on mobile and notice that Hello World is returned from the api on the Data Fetching Page

Notice that the trpc client object is set differently than for mobile at packages/app/utils/trpc/index.web.ts.

I have been trying to investigate the issue with the related next.js changes that have been made recently.

FYI.. I have been using the t4-stack with trpc working for web for a while now but only bringing my stack update to date recently with the latest changes in the stack that were made in the past 2 months.

Not sure if it's due to upgrading to Next.js 14 or not?

Using only frontend part?

Hi. I am backend developer with some expirience with React and almost zero experience with React Native. I have started on a side project where backend is already partially done and now I am starting on a frontend part which requires both web and native implementation. My question is how much effort can it take to replace backend and auth with a different stack? For example Firebase Auth will be used for auth and Azure services for backend (Azure functions as one of example). Thank you.

Add AuthJS support (NextAuth before) besides clerk/supabase.

Although I'm happy to use supabase Auth for now, I think it sucks when having to start from templates to have to create SaaS accounts. free tiers can be nice at the start but are at the trap in the long road. (And yes, supabase is still FOSS and you can self-host your own instances if you need to)

Just saw another trpc example twitter clone project using prisma/supabase/next-auth, wondering if we would like this here.

Also would be nice if some of the options for each feature like auth, or else, are modular enough that you can choice from, no idea if there's any other way to do so without mantaining separte branches for them without the burdine that keeping them on sync with master would suppose feature-wise

https://authjs.dev/

The same feature choice could be nice for database/orm as not everyone would be OK using d1/sqlite based stuff for production yet. I for one plan to use prisma/postgres on my own codebase if possible!

Provide watermelonDB example

I was trying to get it to run with watermelonDB but the built app crashed on launch. It does work for me the tamagui starter.

For the tamagui starter I needed to update the burnt module in all repos inside the monorepo and create a new build

Supabase Google provider scope authorization error.

When logging in in the default T4 template after adding Supabase credentials in env the Google Auth fails with Authorization error.
Sign-in-Google-Accounts

It seems that the scopes are provided in the file https://github.com/timothymiller/t4-app/blob/eaec461e0a69a8113a3d90bee25d868fcbd5cefb/packages/app/features/sign-in/screen.tsx at line 18. I locally fixed the issue by adding options: { scopes: 'https://www.googleapis.com/auth/userinfo.email, https://www.googleapis.com/auth/userinfo.profile' }, since I plan to use only Google provider but that does not seem optimal solution as Supabase can have multiple providers each having its own unique scope.

Steps to reproduce

  • Add Supabase credentials in the T4 template.
  • Enable Google Auth from the Supabase Dashboard.
  • Run app and log in with Google Sign in

Platform
Windows 11, WSL, Ubuntu 22, Node 18.

[Bug] Tanstack Table example doesn't work

The Tankstack Table example has an odd behaviour, I've tested this on web.
It flashes the loaded content correctly for a second and then it disappears completely leaving the user with this screen without any table:

2023-08-16 12_00_55-TanStack Table โ€” Firefox Nightly

The console shows the following errors:

2023-08-16 11_56_49-

Authentification issue on Safari

Tested on Safari for Mac, Version 17.1 (19616.2.9.11.7). Doesn't work.
Tested on Chrome for Mac, it works.

I can login using the password login option, after redirection, I can see the 'Sign out' button.
If I refresh the page or go to the 'fetch data' page, the buttons are back to 'Sign In Sign Up', and it says 'Protected Route - Not authenticated'.

Also have this error in the terminal:

mf:inf] OPTIONS /trpc/auth.secretMessage 204 Not Found (1ms)
[mf:inf] GET /trpc/auth.secretMessage 401 Unauthorized (1ms)

bun web fails

โฏ bun web
$ cd apps/next && bun run dev
$ bun with-env next dev
$ dotenv -e ../../.env.local -- next dev
 โ—‹ (pwa) PWA support is disabled.
 โ—‹ (pwa) PWA support is disabled.
  โ–ฒ Next.js 13.5.6
  - Local:        http://localhost:3000
  - Environments: .env
  - Experiments (use at your own risk):
     ยท scrollRestoration
     ยท forceSwcTransforms

 โœ“ Ready in 3.6s

    โžก [tamagui] built config and components (287ms):

        Config     ./.tamagui/tamagui.config.cjs
        Components ./.tamagui/tamagui-components.config.cjs
             ./.tamagui/t4ui-components.config.cjs
        
Tamagui failed loading "/Users/ishanks/dev/tamago/apps/next/.tamagui/tamagui.config.cjs"
  
  Cannot access 'View' before initialization
  /Users/ishanks/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:19
  View: () => View
              ^

ReferenceError: Cannot access 'View' before initialization
    at Object.View (/Users/ishanks/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:19:15)
    at Object.get (/Users/ishanks/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:11:88)
    at Object.<anonymous> (/Users/ishanks/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:25:25)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Module._compile (/Users/ishanks/dev/tamago/node_modules/esbuild-register/dist/node.js:2258:26)
    at Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Object.newLoader (/Users/ishanks/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
    at Object.extensions..js (/Users/ishanks/dev/tamago/node_modules/esbuild-register/dist/node.js:4838:24)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at Module.mod.require (/Users/ishanks/dev/tamago/node_modules/next/dist/server/require-hook.js:64:28)
    at /Users/ishanks/dev/tamago/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:88
    at requireTamaguiCore (/Users/ishanks/dev/tamago/node_modules/@tamagui/static/dist/cjs/helpers/requireTamaguiCore.js:23:10)
    at Module.tamaguiRequire [as require] (/Users/ishanks/dev/tamago/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:63)

  
Tamagui failed loading "/Users/ishanks/dev/tamago/apps/next/.tamagui/tamagui-components.config.cjs"
  
  Cannot access 'View' before initialization
  /Users/ishanks/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:19
  View: () => View
              ^

ReferenceError: Cannot access 'View' before initialization
    at Object.View (/Users/ishanks/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:19:15)
    at Object.get (/Users/ishanks/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:11:88)
    at Object.<anonymous> (/Users/ishanks/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:25:25)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Module._compile (/Users/ishanks/dev/tamago/node_modules/esbuild-register/dist/node.js:2258:26)
    at Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at newLoader (/Users/ishanks/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
    at Object.newLoader (/Users/ishanks/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
    at Object.extensions..js (/Users/ishanks/dev/tamago/node_modules/esbuild-register/dist/node.js:4838:24)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at Module.mod.require (/Users/ishanks/dev/tamago/node_modules/next/dist/server/require-hook.js:64:28)
    at /Users/ishanks/dev/tamago/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:88
    at requireTamaguiCore (/Users/ishanks/dev/tamago/node_modules/@tamagui/static/dist/cjs/helpers/requireTamaguiCore.js:23:10)

  
Tamagui failed loading "/Users/ishanks/dev/tamago/apps/next/.tamagui/t4ui-components.config.cjs"
  
  Cannot access 'View' before initialization
  /Users/ishanks/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:19
  View: () => View
              ^

ReferenceError: Cannot access 'View' before initialization
    at Object.View (/Users/ishanks/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:19:15)
    at Object.get (/Users/ishanks/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:11:88)
    at Object.<anonymous> (/Users/ishanks/dev/tamago/node_modules/@tamagui/core/dist/cjs/index.js:25:25)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Module._compile (/Users/ishanks/dev/tamago/node_modules/esbuild-register/dist/node.js:2258:26)
    at Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at newLoader (/Users/ishanks/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
    at Object.newLoader (/Users/ishanks/dev/tamago/node_modules/esbuild-register/dist/node.js:2262:9)
    at Object.extensions..js (/Users/ishanks/dev/tamago/node_modules/esbuild-register/dist/node.js:4838:24)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at Module.mod.require (/Users/ishanks/dev/tamago/node_modules/next/dist/server/require-hook.js:64:28)
    at /Users/ishanks/dev/tamago/node_modules/@tamagui/static/dist/cjs/registerRequire.js:48:88
    at requireTamaguiCore (/Users/ishanks/dev/tamago/node_modules/@tamagui/static/dist/cjs/helpers/requireTamaguiCore.js:23:10)

  
Missing theme, an error occurred when importing your config
Got config: [Function (anonymous)] {
  displayName: 'ProxyWorm - Check excludeReactNativeWebExports',
  _isProxyWorm: true
}
Looking for theme: displayName

error in CONFIGURE_EXPO_UPDATES phase

TypeError: (0 , Updates_1.getRuntimeVersionNullable) is not a function breaks my first preview build after fresh installation.

What I have changed:

  1. Update .env.local
  2. Create a project in eas
  3. update eas slug and name
  4. Rename package name in /package.json

What I have not done (which I think is not related to my issue):

  1. Supabase settings // Because I don't suppose to use supabase as DB
  2. Wrangler settings // No plan to use CF either.

Tail of full log:

...
[RUN_EXPO_DOCTOR]   [email protected] - expected version: ~3.22.0
[RUN_EXPO_DOCTOR]   [email protected] - expected version: 13.9.0
[RUN_EXPO_DOCTOR] Your project may not work correctly until you install the correct versions of the packages.
[RUN_EXPO_DOCTOR] Fix with: npx expo install --fix
[RUN_EXPO_DOCTOR] Found outdated dependencies
[RUN_EXPO_DOCTOR] One or more checks failed, indicating possible issues with the project.
[RUN_EXPO_DOCTOR] Advice: Upgrade dependencies that are using the invalid package versions.
[RUN_EXPO_DOCTOR] 
[RUN_EXPO_DOCTOR] Advice: Use 'npx expo install --check' to review and upgrade your dependencies.
[RUN_EXPO_DOCTOR] Command "expo doctor" failed.
Error: npx -y expo-doctor exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23)
    at Object.onceWrapper (node:events:629:26)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
    ...
    at spawnAsync (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at spawn (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/turtle-spawn/dist/index.js:16:47)
    at runExpoDoctor (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/build-tools/dist/common/setup.js:98:50)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/build-tools/dist/common/setup.js:71:36
    at async BuildContext.runBuildPhase (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/build-tools/dist/context.js:107:28)
    at async setupAsync (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/build-tools/dist/common/setup.js:69:9)
    at async buildAsync (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/build-tools/dist/builders/android.js:38:5)
    at async runBuilderWithHooksAsync (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/build-tools/dist/builders/common.js:12:13)
    at async Object.androidBuilder (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/build-tools/dist/builders/android.js:24:16)
[PREBUILD] - Creating native project directories (./ios and ./android) and updating .gitignore
[PREBUILD] โœ” Created native project | gitignore skipped
[PREBUILD] - Updating your package.json scripts, dependencies, and main file
[PREBUILD] โ€บ Using current versions instead of recommended expo-splash-screen@~0.20.5.
[PREBUILD] - Updating your package.json scripts, dependencies, and main file
[PREBUILD] โœ” Updated package.json and added index.js entry point for iOS and Android
[PREBUILD] - Config syncing
[PREBUILD] Using node to generate images. This is much slower than using native packages.
[PREBUILD] โ€บ Optionally you can stop the process and try again after successfully running `npm install -g sharp-cli`.
[PREBUILD] - Config syncing
[PREBUILD] โœ” Config synced
[PREBUILD] We detected that 'apps/expo' is a bun workspace
[PREBUILD] Running "bun install" in /var/folders/2t/vcv67wt91cs9xkbwtx4d8g7m0000gn/T/eas-build-local-nodejs/37936a24-3054-4b35-8e88-e099a8f09961/build directory
[PREBUILD] bun install v1.0.22 (b400b36c)
[PREBUILD] + @t4/api@workspace:packages/api
[PREBUILD]  + @t4/ui@workspace:packages/ui
[PREBUILD]  + app@workspace:packages/app
[PREBUILD]  + expo-app@workspace:apps/expo
[PREBUILD]  + next-app@workspace:apps/next
[PREBUILD] 
[PREBUILD]  5 packages installed [649.00ms]
[PREPARE_CREDENTIALS] Writing secrets to the project's directory
[PREPARE_CREDENTIALS] Injecting signing config into build.gradle
[CONFIGURE_EXPO_UPDATES] 
TypeError: (0 , Updates_1.getRuntimeVersionNullable) is not a function
    at configureExpoUpdatesIfInstalledAsync (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/build-tools/dist/utils/expoUpdates.js:120:195)
    at async /Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/build-tools/dist/builders/android.js:70:9
    at async BuildContext.runBuildPhase (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/build-tools/dist/context.js:107:28)
    at async buildAsync (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/build-tools/dist/builders/android.js:69:5)
    at async runBuilderWithHooksAsync (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/build-tools/dist/builders/common.js:12:13)
    at async Object.androidBuilder (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/@expo/build-tools/dist/builders/android.js:24:16)
    at async buildAndroidAsync (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/eas-cli-local-build-plugin/dist/android.js:66:12)
    at async buildAsync (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/eas-cli-local-build-plugin/dist/build.js:52:29)
    at async main (/Users/windrunner/.npm/_npx/dddba3c650ba3521/node_modules/eas-cli-local-build-plugin/dist/main.js:16:9)

Build failed
Unknown error. See logs of the Configure expo-updates build phase for more information.
npx exited with non-zero code: 1
    Error: build command failed.
error: script "build:android:preview" exited with code 1
error: script "build:android:preview" exited with code 1

Lucia branch: Check `sendResult` and forward `PUBLIC_SUPPORT_EMAIL` and `RESEND_API_KEY` vars to CF deployment

When the user wants to reset their password, the call to the backend returns 200 so the frontend thinks the email was sent,
but the email doesn't get sent: In the resend.com logs, it shows HTTP error 422 because the from field is missing in the payload:

{
    "name": "missing_required_field",
    "message": "Missing `from` field.",
    "statusCode": 422
}
image

I just saw that there's a TODO in the code to check the sendResult:

// TODO check sendResult response for success

In this case, from was missing because it's passed like this

from: ctx.env.PUBLIC_SUPPORT_EMAIL,

and PUBLIC_SUPPORT_EMAIL was undefined.

So we could use this issue to cover both:

  • checking sendResult: In case of HTTP error, forward that so that the frontend doesn't think the email got sent when it didn't
  • Adding the PUBLIC_SUPPORT_EMAIL and RESEND_API_KEY GH action secrets (.github/workflows/backend.yml) to be forwarded to the CF deployment, like:
      - name: Deploy
        uses: cloudflare/[email protected]
        with:
          wranglerVersion: '3.15.0'
          apiToken: ${{ secrets.CF_API_TOKEN }}
          workingDirectory: packages/api
          command: deploy src/worker.ts
          packageManager: bun
          secrets: |
            APP_URL
            CI
            RESEND_API_KEY
            PUBLIC_SUPPORT_EMAIL
        env:
          APP_URL: ${{ secrets.NEXT_PUBLIC_APP_URL }}
          CI: true
          RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
          PUBLIC_SUPPORT_EMAIL: ${{ secrets.PUBLIC_SUPPORT_EMAIL }}
          NO_D1_WARNING: true

@rmarscher

supabaseUrl/imageUrl is required error being thrown until adding the `console.log` line

image

I got the error above after filling in the env.local for the env variables,

interestingly, when I add a console.log in the file below, the error dissapears

import { createClient } from '@supabase/supabase-js'
import * as SecureStore from 'expo-secure-store'
import 'react-native-url-polyfill/auto'

const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL as string
// this is the line I added to make the error go away
console.log('print anything here')

I suppose there must be some env variable loading problems that causes this?

Similarly for imageURL

import { SolitoImageProvider as SolitoImageProviderOG } from 'solito/image'

const imageURL = process.env.NEXT_PUBLIC_APP_URL as `http:${string}` | `https:${string}`
// this is, again, the line I have to add to make the error go away
console.log('printanything')

Images not working with expo due to solito-image

No images when running expo.

In solito-image, index.tsx uses:

process.env.NEXT_PUBLIC_APP_URL, but it's not available in expo.

Replacing this with process.env.EXPO_PUBLIC_APP_URL solves it.

export const getImageUrl = () => {
  const imageUrl = `${process.env.NEXT_PUBLIC_APP_URL}`
  return replaceLocalhost(imageUrl)
}

Expo config env variables

In app.config.ts, it reads multiple env variables.

These variables do not exist (bun install prefixes all variables with EXPO_PUBLIC_).

It should be EXPO_PUBLIC_EAS_PROJECT_ID, EXPO_PUBLIC_EAS_OWNER.

Also, I would recommend removing hardcoded values, to leverage env variables, and to make the template free of hardcoded values.

Something like this works for us:

import { ConfigContext, ExpoConfig } from '@expo/config'

export default ({ config }: ConfigContext): ExpoConfig => ({
  ...config,
  extra: {
    eas: {
      projectId: process.env.EXPO_PUBLIC_EAS_PROJECT_ID,
    },
  },
  owner: process.env.EXPO_PUBLIC_EAS_OWNER,
  plugins: ['expo-router'],
  experiments: {
    tsconfigPaths: true,
    typedRoutes: true,
  },
  platforms: ['ios', 'android'],
  ios: {
    bundleIdentifier: process.env.EXPO_PUBLIC_EAS_OWNER_ID,
  },
  android: {
    package: process.env.EXPO_PUBLIC_EAS_OWNER_ID,
  },
  name: process.env.EXPO_PUBLIC_EAS_NAME,
  slug: process.env.EXPO_PUBLIC_EAS_SLUG,
  updates: {
    url:
      process.env.EXPO_PUBLIC_EAS_UPDATES_URL,
  },
  runtimeVersion: {
    policy: 'sdkVersion',
  },
})

Please note that we added new variables to .env.local, and also expo.yml.

How is the shared code and `.native` // `.web` code merged if at all?

Noobie question, but am wondering what the merge logic is for the various platform override code?

For example the demo mostly have .tsx and .web.tsx. Does this mean that the .web.tsx files somehow has .tsx components // logic? Or are they completely separate?

Current intuition suggests that .native.tsx or .web.tsx will completely replace the .tsx file.

Would love to be pointed to any of the right package docs for more on this

Lucia branch: ERROR: Failed to produce a Cloudflare Pages build from the project. The route `/oauth/[provider]` was not configured to run with the Edge Runtime

When I run the CF-deploy GH action

- name: Publish to Cloudflare Pages

I get this error:

โšก๏ธ Completed bunx vercel build.

โšก๏ธ ERROR: Failed to produce a Cloudflare Pages build from the project.
โšก๏ธ
โšก๏ธ The following routes were not configured to run with the Edge Runtime:
โšก๏ธ - /oauth/[provider]
โšก๏ธ
โšก๏ธ Please make sure that all your non-static routes export the following edge runtime route segment config:
โšก๏ธ export const runtime = 'edge';
โšก๏ธ
โšก๏ธ You can read more about the Edge Runtime on the Next.js documentation:
โšก๏ธ https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes

Any idea why? It didn't happen when I tried deploying the master branch a month ago..

Question about auth with Clerk

Hey there! Thank you for open sourcing this and all the effort you've clearly put into the project!

Could you please explain how the Cloudflare Workers server uses Clerk to verify the user is authenticated? I'm interested in both of these technologies but haven't used them yet, so apologies if the answer seems obvious. I see that on the api package there's this dependency @clerk/backend but it's not used. Instead the @tsndr/cloudflare-worker-jwt lib is used. I was expecting the server would hit Clerk's API with the session from the client to verify the user?

Separate comment: it looks like the invite to the Discord served expired.

Thanks again @timothymiller

`pnpm create t4-app` fails

image

tamagui-build fails because the pnpm install failed because there is no pnpm-workspace.yaml file

Okay.. so I added one with this inside:

packages:
  - 'apps/*'
  - 'packages/*'

And ran pnpm install and got this:
image

Okay.. so let's try yarn now? (after removing all nested node_modules folders and the lock file):

szebert@Szeberts-MBP test-t4-app % yarn install
yarn install v1.22.19
info No lockfile found.
[1/5] ๐Ÿ”  Validating package.json...
warning [email protected]: The engine "bun" appears to be invalid.
[2/5] ๐Ÿ”  Resolving packages...
[3/5] ๐Ÿšš  Fetching packages...
warning [email protected]: The engine "bun" appears to be invalid.
[4/5] ๐Ÿ”—  Linking dependencies...
[5/5] ๐Ÿ”จ  Building fresh packages...
success Saved lockfile.
$ bun run build
$ cd packages/ui && tamagui-build
built @t4/ui in 56 ms
โœจ  Done in 130.46s.

Okay, while omitting around 2 dozen unmet peer dependency warnings, it looks like I can finally run this?

szebert@Szeberts-MBP test-t4-app % yarn dev  
yarn run v1.22.19
warning [email protected]: The engine "bun" appears to be invalid.
$ turbo dev --parallel --filter={next-app,@t4/api}
Error: We detected multiple package managers in your repository: yarn, bun. Please remove one of them.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Okay.. right, this project uses bun. So let's remove yarn and install with bun (after removing all nested node_modules folders and the lock file):
image
Looks like it's working now.. let's try to run bun dev:

szebert@Szeberts-MBP test-t4-app % bun dev
$ turbo dev --parallel --filter={next-app,@t4/api}
โ€ข Packages in scope: @t4/api, next-app
โ€ข Running dev in 2 packages
โ€ข Remote caching disabled
next-app:dev: cache bypass, force executing 8236184cfec690e8
@t4/api:dev: cache bypass, force executing 94b5a82d1d39c133
@t4/api:dev: $ wrangler dev
next-app:dev: $ bun with-env next dev
next-app:dev: $ dotenv -e ../../.env.local -- next dev
@t4/api:dev:  โ›…๏ธ wrangler 3.15.0
@t4/api:dev: -------------------
@t4/api:dev: โ–ฒ [WARNING] Enabling Node.js compatibility mode for built-ins and globals. This is experimental and has serious tradeoffs. Please see https://github.com/ionic-team/rollup-plugin-node-polyfills/ for more details.
@t4/api:dev: 
@t4/api:dev: 
@t4/api:dev: Your worker has access to the following bindings:
@t4/api:dev: - D1 Databases:
@t4/api:dev:   - DB: production (aa5e3923-0f1b-469a-8bb8-d10fb866efe0)
@t4/api:dev: โŽ” Starting local server...
โŽ” Reloading local server...
hello
[mf:inf] Ready on http://0.0.0.0:8787
[mf:inf] - http://127.0.0.1:8787
[mf:inf] - http://192.168.1.70:8787
[mf:inf] - http://192.168.1.69:8787
hello
[mf:inf] Updated and ready on http://0.0.0.0:8787
@t4/api:dev: 
next-app:dev:  โ—‹ (pwa) PWA support is disabled.
next-app:dev:  โ—‹ (pwa) PWA support is disabled.
next-app:dev:   โ–ฒ Next.js 13.5.6
next-app:dev:   - Local:        http://localhost:3000
next-app:dev:   - Environments: .env
next-app:dev:   - Experiments (use at your own risk):
next-app:dev:      ยท scrollRestoration
next-app:dev:      ยท forceSwcTransforms
next-app:dev: 
next-app:dev:  โœ“ Ready in 3.6s
next-app:dev: <w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Resolving 'next/dist/compiled/webpack/webpack-lib' in /Users/szebert/CodeProjects/test-t4-app/node_modules/@ducanh2912/next-pwa/dist for build dependencies doesn't lead to expected result '/Users/szebert/CodeProjects/test-t4-app/node_modules/next/dist/compiled/webpack/webpack-lib.js', but to '/Users/szebert/CodeProjects/test-t4-app/node_modules/@ducanh2912/next-pwa/node_modules/next/dist/compiled/webpack/webpack-lib.js' instead. Resolving dependencies are ignored for this path.
next-app:dev: <w>  at unknown 4 next/dist/compiled/webpack/webpack-lib
next-app:dev: <w>  at file dependencies /Users/szebert/CodeProjects/test-t4-app/node_modules/@ducanh2912/next-pwa/dist/index.cjs
next-app:dev: <w>  at file /Users/szebert/CodeProjects/test-t4-app/node_modules/@ducanh2912/next-pwa/dist/index.cjs
next-app:dev: <w>  at file dependencies /Users/szebert/CodeProjects/test-t4-app/apps/next/next.config.js
next-app:dev: <w>  at file /Users/szebert/CodeProjects/test-t4-app/apps/next/next.config.js
next-app:dev: <w>  at resolve commonjs /Users/szebert/CodeProjects/test-t4-app/apps/next/next.config.js
next-app:dev: <w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Resolving 'next/dist/compiled/webpack/webpack-lib' in /Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/next-plugin/dist/cjs for build dependencies doesn't lead to expected result '/Users/szebert/CodeProjects/test-t4-app/node_modules/next/dist/compiled/webpack/webpack-lib.js', but to '/Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/next-plugin/node_modules/next/dist/compiled/webpack/webpack-lib.js' instead. Resolving dependencies are ignored for this path.
next-app:dev: <w>  at unknown 4 next/dist/compiled/webpack/webpack-lib
next-app:dev: <w>  at file dependencies /Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/next-plugin/dist/cjs/withTamagui.js
next-app:dev: <w>  at file /Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/next-plugin/dist/cjs/withTamagui.js
next-app:dev: <w>  at file dependencies /Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/next-plugin/dist/cjs/index.js
next-app:dev: <w>  at file /Users/szebert/CodeProjects/test-t4-app/node_modules/@tamagui/next-plugin/dist/cjs/index.js
next-app:dev: <w>  at file dependencies /Users/szebert/CodeProjects/test-t4-app/apps/next/next.config.js
next-app:dev: <w>  at file /Users/szebert/CodeProjects/test-t4-app/apps/next/next.config.js
next-app:dev: <w>  at resolve commonjs /Users/szebert/CodeProjects/test-t4-app/apps/next/next.config.js
next-app:dev: 
next-app:dev:     โžก [tamagui] built config and components (1303ms):
next-app:dev: 
next-app:dev:         Config     ./.tamagui/tamagui.config.cjs
next-app:dev:         Components ./.tamagui/tamagui-components.config.cjs
next-app:dev:              ./.tamagui/t4ui-components.config.cjs
next-app:dev:         
next-app:dev: 
next-app:dev: โš ๏ธ Tamagui Warning [001]: Skipping loading /Users/szebert/CodeProjects/test-t4-app/apps/next/.tamagui/tamagui.config.cjs due to error bundling.
next-app:dev:    - message: Cannot access 'Stack' before initialization
next-app:dev:    - for more info see: https://tamagui.dev/docs/intro/errors#warning-001
next-app:dev:    - set TAMAGUI_SHOW_FULL_BUNDLE_ERRORS=1 to see stack trace
next-app:dev: 
next-app:dev: 
next-app:dev: 
next-app:dev: โš ๏ธ Tamagui Warning [001]: Skipping loading /Users/szebert/CodeProjects/test-t4-app/apps/next/.tamagui/tamagui-components.config.cjs due to error bundling.
next-app:dev:    - message: Cannot access 'Stack' before initialization
next-app:dev:    - for more info see: https://tamagui.dev/docs/intro/errors#warning-001
next-app:dev:    - set TAMAGUI_SHOW_FULL_BUNDLE_ERRORS=1 to see stack trace
next-app:dev: 
next-app:dev: 
next-app:dev: 
next-app:dev: โš ๏ธ Tamagui Warning [001]: Skipping loading /Users/szebert/CodeProjects/test-t4-app/apps/next/.tamagui/t4ui-components.config.cjs due to error bundling.
next-app:dev:    - message: Cannot access 'Stack' before initialization
next-app:dev:    - for more info see: https://tamagui.dev/docs/intro/errors#warning-001
next-app:dev:    - set TAMAGUI_SHOW_FULL_BUNDLE_ERRORS=1 to see stack trace
next-app:dev: 
next-app:dev: 
next-app:dev: Missing theme, an error occurred when importing your config
next-app:dev: Got config: [Function (anonymous)] {
next-app:dev:   displayName: 'ProxyWorm - Check excludeReactNativeWebExports',
next-app:dev:   _isProxyWorm: true
next-app:dev: }
next-app:dev: Looking for theme: displayName

Getting this when trying to access localhost:3000 and only getting a back an ERR_CONNECTION_REFUSED.

Can we have a working
pnpm create t4-app (or bun create t4-app)
that we can we can just run pnpm dev right after? This will help with getting new people on board.

[Bug] Expo android apk doesn't start

The apk downloaded from the latest expo build comment is not starting and it's giving an error about expo-updates not being configured correctly as shown in the log below:

Screenshot_2023-07-30-11-52-18-648_com.miui.bugreport.jpg

I'm going to try on some of the previous builds and see if they work.

I think this is related to expo/eas-cli#1951 and expo/expo#21238

Confusion with T3

Hey everyone, first and foremost, cool project, been following for a while!

I would like to raise a concern about the confusion that is happening in the community, a number of users of this project mistakenly associate this project with t3 due to the very similar naming. Although the readme clearly states the author of the project, it's much less clear on the website.

I would like to propose a simple resolution in the form of FAQ section on the project's main page and readme file. It could clearly state that this project is not affiliated with, associated with, or endorsed by t3.

I believe proposed change will beneficial for the community, save confusion and will help in maintaining the distinct identities of both projects. I am more than willing to assist in drafting or refining FAQ section if needed.

appreciate all maintainers for the hard work!

image

great work

appreciate the app, in future plans to use capacitor?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.