-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: fix yarn install error if rules_nodejs
linked local packages
#22595
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
build: fix yarn install error if rules_nodejs
linked local packages
#22595
Conversation
Currently if a package like `@angular/cdk` is used locally within a Bazel NodeJS action (e.g. when using with `rollup_bundle`), the Bazel NodeJS rules link the build output into the local `node_modules/` folder. This is problematic because later if `yarn` is executed, the linked packages are incorrectly included in the `angular-tsconfig.json` project (which is used for summary generation to allow for Bazel View Engine tests) We fix this by explicitly excluding our local packages to avoid errors such as: ``` info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. (warning Resolution field "[email protected]" is incompatible with requested version "typescript@^3.2.2" node_modules/@angular/components-examples/material/chips/chips-harness/chips-harness-example.d.ts:8:13 - error TS2503: Cannot find namespace 'jasmine'. ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…#22595) Currently if a package like `@angular/cdk` is used locally within a Bazel NodeJS action (e.g. when using with `rollup_bundle`), the Bazel NodeJS rules link the build output into the local `node_modules/` folder. This is problematic because later if `yarn` is executed, the linked packages are incorrectly included in the `angular-tsconfig.json` project (which is used for summary generation to allow for Bazel View Engine tests) We fix this by explicitly excluding our local packages to avoid errors such as: ``` info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. (warning Resolution field "[email protected]" is incompatible with requested version "typescript@^3.2.2" node_modules/@angular/components-examples/material/chips/chips-harness/chips-harness-example.d.ts:8:13 - error TS2503: Cannot find namespace 'jasmine'. ``` (cherry picked from commit 58a7421)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently if a package like
@angular/cdk
is used locally within aBazel NodeJS action (e.g. when using with
rollup_bundle
), the BazelNodeJS rules link the build output into the local
node_modules/
folder.This is problematic because later if
yarn
is executed, the linkedpackages are incorrectly included in the
angular-tsconfig.json
project(which is used for summary generation to allow for Bazel View Engine tests)
We fix this by explicitly excluding our local packages to avoid errors
such as: