create-react-app: Typescript and pnp enabled app fails to compile
Describe the bug
yarn start
results in the following error
Failed to compile.
undefined
TypeScript error in undefined(undefined,undefined):
Cannot find type definition file for 'lodash'. TS2688
Did you try recovering your dependencies?
Ran yarn
, using yarn@latest ( atm yarn@1.17.3
)
Which terms did you search for in User Guide?
- typescript
- yarn pnp
- typescript and yarn pnp
- lodash
Environment
Environment Info:
System:
OS: Linux 5.0 Ubuntu 19.04 (Disco Dingo)
CPU: (8) x64 AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx
Binaries:
Node: 11.14.0 - ~/.nvm/versions/node/v11.14.0/bin/node
Yarn: 1.17.3 - ~/.nvm/versions/node/v11.14.0/bin/yarn
npm: 6.10.2 - ~/.nvm/versions/node/v11.14.0/bin/npm
Browsers:
Chrome: 75.0.3770.142
Firefox: 68.0.1
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: 3.0.1
Steps to reproduce
(Write your steps here:)
create-react-app test --typescript --use-pnp
- cd test
- yarn
- yarn start
Expected behavior
No error occurs and app start sucessfully
Actual behavior
Reproducible demo
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 15 (7 by maintainers)
Im also having this issue trying to use CRA as a monorepo package (yarn workspaces) with yarn PNP