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

@angular/bazel always generates WORKSPACE with yarn_install even if ng used npm #30164

Closed
alexeagle opened this issue Apr 27, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@alexeagle
Copy link
Contributor

commented Apr 27, 2019

By default I do ng new, ng add @angular/bazel, I have a package-lock.json file but bazel fails because it looks for yarn.lock instead

@m-henderson

This comment has been minimized.

Copy link

commented Apr 27, 2019

so basically we should check to see if npm was used and if it was we need to look for a package-lock.json instead of yarn.lock?

@alexeagle

This comment has been minimized.

Copy link
Contributor Author

commented Apr 29, 2019

Workaround is to create projects with yarn
ng config -g cli.packageManager yarn
or manually change the WORKSPACE file produced by the @angular/bazel schematic to use npm_install in place of yarn_install

The fix is for the schematic to be written with an npm_install rule if npm was used, yes

kyliau added a commit to kyliau/angular that referenced this issue May 13, 2019

fix(bazel): Use existing npm/yarn lock files
This PR fixes Bazel builder to create yarn_install rule in WORKSPACE if
yarn.lock is present, otherwise npm_install rule if package-lock.json is
present. If none is present, default to yarn_install and create an empty
yarn.lock file.

PR closes angular#30164

kyliau added a commit to kyliau/angular that referenced this issue May 13, 2019

fix(bazel): Use existing npm/yarn lock files
This PR fixes Bazel builder to create yarn_install rule in WORKSPACE if
yarn.lock is present, otherwise npm_install rule if package-lock.json is
present. If none is present, default to yarn_install and create an empty
yarn.lock file.

PR closes angular#30164
PR closes angular#30359

@kyliau kyliau referenced this issue May 13, 2019

Closed

fix(bazel): Use existing npm/yarn lock files #30438

2 of 14 tasks complete

@alxhub alxhub closed this in ff29ccc May 14, 2019

alxhub added a commit that referenced this issue May 14, 2019

fix(bazel): Use existing npm/yarn lock files (#30438)
This PR fixes Bazel builder to create yarn_install rule in WORKSPACE if
yarn.lock is present, otherwise npm_install rule if package-lock.json is
present. If none is present, default to yarn_install and create an empty
yarn.lock file.

PR closes #30164
PR closes #30359

PR Close #30438

BioPhoton added a commit to BioPhoton/angular that referenced this issue May 21, 2019

fix(bazel): Use existing npm/yarn lock files (angular#30438)
This PR fixes Bazel builder to create yarn_install rule in WORKSPACE if
yarn.lock is present, otherwise npm_install rule if package-lock.json is
present. If none is present, default to yarn_install and create an empty
yarn.lock file.

PR closes angular#30164
PR closes angular#30359

PR Close angular#30438
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.