Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upYarn 2.0 Support Status #16980
Yarn 2.0 Support Status #16980
Comments
Another way of making Angular 9 work with Yarn 2.0 is to use Yarn team is investing into |
Some possibly relevant information regarding improving yarn 2.0 support: Replacing I noticed that @clydin authored most of the code in that file, perhaps #14841 could be fixed in the process as well. |
How does 2.1 with node_modules linker improvements impact this issue? https://dev.to/arcanis/yarn-2-1-git-workspaces-focused-installs-loose-mode-live-playground-4kfc |
With |
I'm not suggesting it would be trivial to fix this and have it automatically work the way yarn 2 works by default out of box, in addition to continuing to support NPM... but I would say this would probably go a long ways to improve developer experience. Can't wait until node_modules (at least the way it works today) is a thing of the past. |
There is ongoing work right now in You can read more and track the progress here: angular/angular#38099 |
With the release of Yarn 2.0, many users may be interested in trying out the new version of the package manager with the Angular CLI. As of 9.0, the Angular CLI does not natively support Yarn 2.0 and its new package management strategy named Plug’n’Play (PnP). However, native support is currently and actively being investigated with several initial steps already in place. Native support is tentatively scheduled for inclusion in 10.0 or beyond with the goal of integrating new major versions of upstream dependencies that provide native support.
For those that are interested in experimenting with building applications using the new package manager, you can use the following instructions to workaround the current issues.
WARNING: This is not recommended for use with deployed applications and should not be used in a production environment.
pnpify
package:yarn add -D @yarnpkg/pnpify
yarn unplug <package_name>
. This should include at a minimum all@angular
scoped packages.webdriver-manager
package also needs to be unplugged:yarn unplug webdriver-manager
Once these steps are complete, Angular CLI operations such as serve or build can be used by executing
yarn pnpify ng build
oryarn pnpify ng serve
, respectively.Please note that manually running the
ngcc
command with or without the pnpify utility does not currently work.If any issues are encountered using the workaround steps or for Yarn 2.0 in general, please open a separate issue detailing the problem.