Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List all peerDependencies in @angular-devkit/build-angular's manifest #16979

Closed
4 of 15 tasks
bgotink opened this issue Feb 14, 2020 · 3 comments
Closed
4 of 15 tasks

List all peerDependencies in @angular-devkit/build-angular's manifest #16979

bgotink opened this issue Feb 14, 2020 · 3 comments

Comments

@bgotink
Copy link
Contributor

bgotink commented Feb 14, 2020

🚀 Feature request or 🐞 bug depending on your point of view

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Description

The @angular-devkit/build-angular package imports a couple of packages that it doesn't list in it's dependencies or peerDependencies.
When angular is installed using a package manager that doesn't use node_modules (e.g. yarn 2 with plug'n'play), the @angular-devkit/build-angular package cannot access these unlisted dependencies anymore.

Using a package manager that uses node_modules (yarn without PnP, npm, …) this works because the node_modules dependency resolution algorithm is quite forgiving.

Describe the solution you'd like

List these hidden dependencies as (optional) peer dependencies of the @angular-devkit/build-angular package.

The list of hidden dependencies includes, after a cursory search, at least the following packages:

  • karma
  • typescript
  • node-sass
  • protractor
  • tslint

Describe alternatives you've considered

  • Don't support yarn 2.
  • Yarn 2 supports "package extensions" for explicitly this use case: to patch packages that are missing some dependencies and/or peerDependencies.
    This of course means these package extensions need to be added somewhere:
    • Everyone can add them to their own projects, this is by far the worst option
    • Yarn has a compatibility plugin, to support popular packages until they upstream the necessary changes.
    • A custom yarn plugin could include package extensions as well.
  • Yarn 2 has a "pnpify" binary that mocks a node_modules file structure. This requires everyone to run Angular CLI commands as yarn pnpify ng and it adds extra startup time to every angular CLI process and every nodejs process spawned by the angular CLI.
@clydin
Copy link
Member

clydin commented Feb 14, 2020

Yarn 2.0 support is being actively investigated but is not officially supported at this time.
Please see this newly created issue for information and progress regarding Yarn 2.0 support: #16980

@bgotink
Copy link
Contributor Author

bgotink commented Feb 14, 2020

Thanks for the info!

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants