Typescript and pnp enabled app fails to compile
See original GitHub issueDescribe 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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Yarn 3.x PNP typescript CRA eslint not working with VSCode
I ran into this issue a bit ago and found that this is due to the module resolver not pointing to the correct...
Read more >Can't start TypeScript service in projects with Yarn pnp when ...
Can't start TypeScript service in projects with Yarn pnp when TypeScript is not in the root folder ; Project, WebStorm ; Type, Bug...
Read more >How to build Power Apps Custom Controls using TypeScript
2. Initialize a Custom control. Just like any other developer project, you need to initialize the control-project and you will use the power ......
Read more >A guide through The Wild Wild West of setting up a mono repo ...
json scripts that we used to specify build order. Referenced projects must have the composite setting enabled. This setting is needed to ensure...
Read more >Questions & Answers | Yarn - Package Manager
Why is TypeScript patched even if I don't use Plug'n'Play? ... us to draft a first implementation of a ESM-compatible PnP loader, which...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Im also having this issue trying to use CRA as a monorepo package (yarn workspaces) with yarn PNP
Closing as this seems to be fixed.