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
An extremely minimal project that uses Yarn w/ PnP and TypeScript fails to compile due to:
src/index.tsx:1:19 - error TS2307: Cannot find module 'react' or its corresponding type declarations.
1 import React from "react"
~~~~~~~
Found 1 error.
Self-service
Describe the bug
An extremely minimal project that uses Yarn w/ PnP and TypeScript fails to compile due to:
To reproduce
Configuration
.yarnrc.yml
tsconfig.json
package.json
Code
index.tsx
Command
Environment
System:
OS: Ubuntu 20.04 LTS (via WSL on Windows 10 Pro 19042.1202)
CPU: Intel(R) Core(TM) i7-8550U
Binaries:
Node: 14.17.6 - /usr/bin/node
Yarn (global): 1.22.11 - /home/me/.npm-global/bin/yarn
npm: 6.14.15 - /usr/bin/npm
Additional context
Per the documentation TypeScript "natively" supports PnP (by way of a patch) so I'm unsure why this simple application isn't working.
If I enable
node_modules
by adding this to.yarnrc.yml
it all works as expected:The text was updated successfully, but these errors were encountered: