This project uses Yarn 2, and the Yarn binary is managed locally by (and committed directly to) this project repo. However, it is still necessary to have a version of yarn installed globally to provide yarn
on the shell path.
npm install -g yarn
Run yarn --version
in this project workspace to confirm that version 2.x.x
is resolved.
Some common CLI commands have changed as of Yarn 2
Yarn Classic (1.x) | Yarn (2.x) |
---|---|
rm -rf node_modules |
yarn cache clean --all |
yarn global add [pkg] |
yarn dlx [pkg] |
yarn outdated |
yarn upgrade-interactive |
See Yarn 2 Migration for more information.
Special configuration is required if you are using an IDE (such as VSCode) to allow the editor to correctly resolve installed workspace modules.
VSCode
VSCode will display a prompt to switch to the "workspace TypeScript version" when opening a .js
or .ts
fille in this project.
Click "Allow" to configure the editor to use the locally installed TypeScript server.
A -pnpify
tagged TypeScript version is displayed at the right of the editor status bar when correctly configured.
Other Editors
Visit the Yarn 2 Editor SDKs documentation for details on configuring integration with other editors.
Untested documentation on configuring Intellij can be found here.