chen-rn / CUA

(deprecateed) create-universal-app(CUA) is an opinionated template for creating fullstack universal apps (Expo, Next, tRPC, Prisma, Clerk, Solito, Tamagui)
https://cua-demo.vercel.app
MIT License
1.02k stars 67 forks source link

Type Error with my/ui #20

Closed gascenciom1998 closed 1 year ago

gascenciom1998 commented 1 year ago

Getting a type error on imports from my/ui, specifically in tamagui.config.ts

Any idea how to make that go?

Screenshot 2023-01-24 at 6 48 52 PM
chen-rn commented 1 year ago

I will look into this! It happens to me as well! Must be caused by some renaming.

chen-rn commented 1 year ago

Okay, it seems that this problem happened because we opened the file before the UI libraries were built.

However, even after the UI library gets built, like VSCode typescript linter does not update. Which is a VSCode cache problem.

(If you delete any character from the @my/ui, and add it back in, it seems that the error goes away as well. But all import errors stay)

So, what I've done now, is to automatically build the UI library after install. This way, VSCode should always have types from @my/ui!

If you don't want to reclone, you can also fix this by doing CMD+SHIFT+P, enter "typescript version", and reselect the VSCode version. For example, going from "Workspace typescript" to ""VSCode typescript" and back. It should re-instantiate your typescript linter!

Screenshot 2023-01-27 at 9 58 32 AM
patrykczubek commented 1 year ago

Once I did that, for some reason my entire file broke.

import { Button, Paragraph, Separator, XStack, YStack, Card, H3, } from "@my/ui";

image

image

Fixed it, I tried first building the ui lib but it didn't help and then switched the typescript version. Removing the built folder in ui helped.

dufok commented 1 year ago

But i have this issue in my Vercel render ...