yarn pnp doesn't work with typescript
See original GitHub issueSet up a pnp typescript project
npx create-react-app pnp --use-pnp --typescript
or npx create-react-app pnp --typescript --use-pnp
order doesnβt matter
You then get
yarn add v1.12.1
[1/5] π Resolving packages...
[2/5] π Fetching packages...
[3/5] π Linking dependencies...
[5/5] π Building fresh packages...
success Saved lockfile.
success Saved 8 new dependencies.
info Direct dependencies
ββ @types/jest@23.3.9
ββ @types/node@10.12.1
ββ @types/react-dom@16.0.9
ββ @types/react@16.4.18
ββ react-dom@16.6.0
ββ react-scripts@2.1.0
ββ react@16.6.0
ββ typescript@3.1.4
info All dependencies
ββ @types/jest@23.3.9
ββ @types/node@10.12.1
ββ @types/react-dom@16.0.9
ββ @types/react@16.4.18
ββ react-dom@16.6.0
ββ react-scripts@2.1.0
ββ react@16.6.0
ββ typescript@3.1.4
β¨ Done in 14.72s.
We detected TypeScript in your project (src/App.test.tsx) and created a tsconfig.json file for you.
It looks like you're trying to use TypeScript but do not have typescript installed.
Please install typescript by running yarn add typescript.
If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files).
Aborting installation.
node --require /Users/bond/Projects/pnp-test/.pnp.js has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.
Environment
System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Binaries:
Node: 8.12.0 - /usr/local/bin/node
Yarn: 1.12.1 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
npmGlobalPackages:
create-react-app: Not Found
Issue Analytics
- State:
- Created 5 years ago
- Reactions:40
- Comments:17 (5 by maintainers)
Top Results From Across the Web
Typescript 4.5 + yarn pnp issues #46874 - GitHub
If I change nodeLinker to node-modules (instead of pnp ), typescript@4.5 works fine. Likewise, downgrading to typescript@4.4 will also work withΒ ...
Read more >Is it possible to use yarn-pnp with typescript/vscode?
Yes! Typescript cli works out of the box in Yarn 2+, so you can just add the package: yarn add -D typescript. and...
Read more >TypeScript and Prettier with Yarn PnP not working in 2021.1
It shows the TypeScript and Prettier packages correctly in the settings dialogs and also resolves other packages in packages.json correctly when using PnP...
Read more >Getting Started - Yarn
Getting started with Plug'n'Play isn't difficult - at its basis it just involves enabling one tiny settings in your package.json file: installConfig.pnp ....
Read more >Yarn v2 PnP is simply a lifesaver if you have a medium+ sized ...
I'll say it's definitely not a plug-n-play migration (pardon the pun). Some issues we ran into: - it can be difficult to reason...
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
I found the time and pushed a PR: https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/250
Once merged Iβll make another one to create-react-app to upgrade fork-ts-checker-webpack-plugin and add support for the resolvers π
PR up at #6856