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.01k stars 67 forks source link

Upgrade to PNPM #56

Open indicozy opened 1 year ago

indicozy commented 1 year ago

Hi there!

It's deep in WIP yet, so it has many bugs. I'll keep you posted on PR.

TODO:

vercel[bot] commented 1 year ago

Someone is attempting to deploy a commit to a Personal Account owned by @chen-rn on Vercel.

@chen-rn first needs to authorize it.

indicozy commented 1 year ago

Some updates:

  1. Moved tsconfig and eslint to packages.
  2. Imported tsconfig and eslint to other packages.
Death666Machine commented 1 year ago

indicozy commented 1 year ago

I'm a bit stuck, could you help with that? on tamagui-build:

Command failed with exit code 1: npx tsc --baseUrl . --outDir types --rootDir src --emitDeclarationOnly --declarationMap
src/MyComponent.tsx(3,14): error TS2742: The inferred type of 'MyComponent' cannot be named without a reference to '.pnpm/@tamagui+core@1.0.17_rn3qun46chv63cytpfol3dndvi/node_modules/@tamagui/core'. This is likely not portable. A type annotation is necessary.
src/animations.ts(3,14): error TS2742: The inferred type of 'animations' cannot be named without a reference to '.pnpm/@tamagui+core@1.0.17_rn3qun46chv63cytpfol3dndvi/node_modules/@tamagui/core'. This is likely not portable. A type annotation is necessary.
src/tamagui.config.ts(53,14): error TS2742: The inferred type of 'config' cannot be named without a reference to '.pnpm/@tamagui+core@1.0.17_rn3qun46chv63cytpfol3dndvi/node_modules/@tamagui/core'. This is likely not portable. A type annotation is necessary.

I'm not sure what's wrong.

indicozy commented 1 year ago

I'm a bit stuck, could you help with that? on tamagui-build:

Command failed with exit code 1: npx tsc --baseUrl . --outDir types --rootDir src --emitDeclarationOnly --declarationMap
src/MyComponent.tsx(3,14): error TS2742: The inferred type of 'MyComponent' cannot be named without a reference to '.pnpm/@tamagui+core@1.0.17_rn3qun46chv63cytpfol3dndvi/node_modules/@tamagui/core'. This is likely not portable. A type annotation is necessary.
src/animations.ts(3,14): error TS2742: The inferred type of 'animations' cannot be named without a reference to '.pnpm/@tamagui+core@1.0.17_rn3qun46chv63cytpfol3dndvi/node_modules/@tamagui/core'. This is likely not portable. A type annotation is necessary.
src/tamagui.config.ts(53,14): error TS2742: The inferred type of 'config' cannot be named without a reference to '.pnpm/@tamagui+core@1.0.17_rn3qun46chv63cytpfol3dndvi/node_modules/@tamagui/core'. This is likely not portable. A type annotation is necessary.

I'm not sure what's wrong.

I guess the issue is within pnpm's security features. I have found this solution, but it's a bit clunky: https://github.com/microsoft/TypeScript/issues/47663#issuecomment-1270716220

Is it OK if I will add these lines for every components? Or is it just simpler to stay in yarn? @chen-rn @Death666Machine

EkaanshArora commented 1 year ago

Have you tried adding preserveSymlinks: true to the tsconfig compiler options? Does that help?