CUA icon indicating copy to clipboard operation
CUA copied to clipboard

Upgrade to PNPM

Open indicozy opened this issue 1 year ago • 6 comments

Hi there!

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

TODO:

  • [ ] rename import other packages from '@my/ui' to 'ui'
  • [ ] make tsconfig less strict OR add types to all packages
  • [ ] reconfigure tsconfig and eslint for this project

indicozy avatar Mar 09 '23 18:03 indicozy

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

@chen-rn first needs to authorize it.

vercel[bot] avatar Mar 09 '23 18:03 vercel[bot]

Some updates:

  1. Moved tsconfig and eslint to packages.
  2. Imported tsconfig and eslint to other packages.

indicozy avatar Mar 10 '23 06:03 indicozy

Death666Machine avatar Mar 10 '23 06:03 Death666Machine

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/@[email protected]_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/@[email protected]_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/@[email protected]_rn3qun46chv63cytpfol3dndvi/node_modules/@tamagui/core'. This is likely not portable. A type annotation is necessary.

I'm not sure what's wrong.

indicozy avatar Mar 10 '23 17:03 indicozy

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/@[email protected]_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/@[email protected]_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/@[email protected]_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

indicozy avatar Mar 22 '23 15:03 indicozy

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

EkaanshArora avatar Mar 28 '23 11:03 EkaanshArora