You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When resolving transitive dependencies [email protected] tries to resolve them from compilerOptions.baseUrl which doesn't match what tsc does.
Resolving import "react" in directory "/tmp/tmp.1Iu4gSxpc7/node_modules/react-dom/cjs" of type "require-call"
Read 13 entries for directory "/tmp/tmp.1Iu4gSxpc7/node_modules/react-dom/cjs"
Checking for "react" in the "browser" map in "/tmp/tmp.1Iu4gSxpc7/node_modules/react-dom/package.json"
Checking for "react"
Checking for "react.tsx"
Checking for "react.ts"
Checking for "react.jsx"
Checking for "react.js"
Checking for "react.css"
Checking for "react.json"
Checking for "react/index"
Checking for "react/index.tsx"
Checking for "react/index.ts"
Checking for "react/index.jsx"
Checking for "react/index.js"
Checking for "react/index.css"
Checking for "react/index.json"
Checking for "./cjs/react" in the "browser" map in "/tmp/tmp.1Iu4gSxpc7/node_modules/react-dom/package.json"
Checking for "./cjs/react"
Checking for "./cjs/react/index"
Failed to find "react"
Searching for "react" in "node_modules" directories starting from "/tmp/tmp.1Iu4gSxpc7/node_modules/react-dom/cjs"
Attempting to load "/tmp/tmp.1Iu4gSxpc7/react" as a file
Checking for file "react"
Checking for file "react.tsx"
Checking for file "react.ts"
Checking for file "react.jsx"
Checking for file "react.js"
Found file "react.js"
Read 12 entries for directory "/tmp/tmp.1Iu4gSxpc7"
This import is under the effect of "/tmp/tmp.1Iu4gSxpc7/tsconfig.json"
Primary path is "/tmp/tmp.1Iu4gSxpc7/react.js" in namespace "file"
I'm still not totally sure what to do about this. One reason why TypeScript doesn't do this is that it doesn't check JavaScript files. Another reason is that (I think?) it doesn't type packages, which is basically the equivalent of esbuild's --packages=external setting, which would also work here. So I'm not sure if esbuild's behavior should be that path mappings in tsconfig files shouldn't apply to JavaScript files, or that they shouldn't apply to node_modules files, or something else.
Describe the bug
When resolving transitive dependencies
[email protected]
tries to resolve them fromcompilerOptions.baseUrl
which doesn't match whattsc
does.Ref yarnpkg/berry#4732
Ref #2473 (comment)
To Reproduce
The text was updated successfully, but these errors were encountered: