Open karthickshanmugam0689 opened 2 months ago
The information you provided is not nearly enough to reproduce the issue (for one it doesn't even include a typescript
dependency). We use React with TypeScript and PnP is this repo ourselves so as it stands we unfortunately cannot say anything more than "it works for us".
Please provide a runnable reproduction so we can take a look. Otherwise you can try debugging it by setting PNP_DEBUG=1
or by using TypeScript's traceResolutions
.
Hi! 👋
It seems like this issue as been marked as probably resolved, or missing important information blocking its progression. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it.
Self-service
Describe the bug
I tried to migrate the enterprise repo from
node_modules
topnp
vianodeLinker
. With this setup, I have no issues with file extensions .jsx. But when I have the files with .tsx, I face issues with typescript, which saysFor example, for react we have @types/react and it fails to identify react. But this problem is only with .tsx files. When we have the same code with .jsx, there is no issue at all. Also if I install the dependencies at the package level, this also works. So the only thing which is not working is the dependencies at the root level. Previously with yarn classic or yarn berry with
nodeLinker: node_modules
, we hadtypeRoots
option in tsconfig.json which has the value./node_modules/@types
. But with yarn pnp, we dont have node_modules. So I guess this is causing the issue here Anyway the other dependenices within monorepo works fine without any issues P.S: I tried to indicate vscode to read the deps from zip file as explained here => https://yarnpkg.com/migration/pnp#editor-support Any advice on the steps that I can take to figure out why types definiton is not working here?To reproduce
main setting in package.json
.yarnrc.yml
tsconfig.base.json
vscode settings.json
Environment
Additional context
No response