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

Upgrade to PNPM #56

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Upgrade to PNPM #56

wants to merge 6 commits into from

Conversation

indicozy
Copy link

@indicozy indicozy commented Mar 9, 2023

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

@vercel
Copy link

vercel bot commented Mar 9, 2023

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
Copy link
Author

indicozy commented Mar 10, 2023

Some updates:

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

@Death666Machine
Copy link

@indicozy
Copy link
Author

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 indicozy marked this pull request as draft March 10, 2023 17:27
@indicozy
Copy link
Author

indicozy commented Mar 22, 2023

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:
microsoft/TypeScript#47663 (comment)

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
Copy link

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

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.

3 participants