-
-
Notifications
You must be signed in to change notification settings - Fork 938
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
Typescript error in package after using pnpm (which does not occur with yarn or npm) #2317
Comments
Might be a Typescript issue? (microsoft/TypeScript#29808) It also happens with Yarn v2. And even when using |
Well, that's interesting. I had tried with Although in yarnv2 there are no symlinks involved, in both cases the actually used modules are located outside of the working directory. The error goes away, as soon as I set Sorry, then. Closing here. |
I have the same issue with Apollo react hooks |
I'm experiencing a similar issue in nodegui/react-nodegui where node_modules/.pnpm/@types+react@18.0.9/node_modules/@types/react/index.d.ts:3226:13 - error TS2717: Subsequent property declarations must have the same type. Property 'script' must be of type 'DetailedHTMLProps<ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>', but here has type 'DetailedHTMLProps<ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>'.
src/demo.tsx:13:10 - error TS2559: Type '{ children: Element; }' has no properties in common with type 'IntrinsicAttributes & ViewProps<QWidgetSignals>'.
13 <View> I'm pretty lost on the how tsc produces different errors based on the node_modules layout. Are we somehow resolving a different tsc version in different cases? Just thought I'd add the detail of another project where this is reproducible in case it might help in debugging. |
Error still existing... |
Hi,
here's a demo repo to show a bug related to typescript:
https://github.com/jeffrson/pnmp_vs_yarn_typescript
When I use yarn, tsc works without issues.
However, when I install modules with pnmp, tsc complains about missing type annotation.
Of course, I could add the type, but IMO it shouldn't matter, whether I use yarn or pnmp and work the same in both cases.
pnpm version:
4.9.0
Code to reproduce the issue:
https://github.com/jeffrson/pnmp_vs_yarn_typescript
node
12.14.1
OS
Windows 10
The text was updated successfully, but these errors were encountered: