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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsconfig.json not correctly updated when installing bazel #30613

Closed
admir86 opened this issue May 22, 2019 · 2 comments
Closed

tsconfig.json not correctly updated when installing bazel #30613

admir86 opened this issue May 22, 2019 · 2 comments
Labels
area: bazel Issues related to the published `@angular/bazel` build rules freq1: low P4 A relatively minor issue that is not relevant to core functions type: bug/fix
Milestone

Comments

@admir86
Copy link

admir86 commented May 22, 2019

馃悶 bug report

Affected Package

"@angular/cli": "~8.0.0-rc.4",
"@angular/bazel": "~8.0.0-rc.4"

Is this a regression?

I don't think so

Description

I'm not sure if it's a bug or I'm missing something, but after adding bazel to an angular/cli project (as described here) which contains a library, the references to the library are broken.
In the tsconfig.json I have paths for the lib:

"paths": {
      "my-lib": [
        "projects/my-lib/src"
      ],
      "my-lib/*": [
        "projects/my-lib/src/*"
      ]
    }

but now the baseUrl is removed in the tsconfig.json and I'm getting this error:

Error: error TS5060: Option 'paths' cannot be used without specifying '--baseUrl' option.

馃敩 Minimal Reproduction

  • update to angular/cli 8.0.0-rc.4
  • create new angular project ng new mrtest
  • add a library ng g library myLib
  • update the paths in tsconfig.json to use the source instead of the lib build output from dist (this way I can make changes to the lib while ng serve, and don't need to rebuild the library after each change)
  • use/import the component/module from the lib in the app
  • try to start the app npm run start -> error:
WARNING: your tsconfig.json file specifies options which are overridden by Bazel:
 - compilerOptions.paths is determined by the module_name attribute in transitive deps[]


src/app/app.module.ts(7,28): error TS2307: Cannot find module 'my-lib'.
  • if try first to build the lib ng build myLib -> error:
BUILD ERROR
error TS5060: Option 'paths' cannot be used without specifying '--baseUrl' option

馃敟 Exception or Error

see above

馃實 Your Environment

Angular Version:


Angular CLI: 8.0.0-rc.4
Node: 10.15.0
OS: win32 x64
Angular: 8.0.0-rc.4
... animations, bazel, cli, common, compiler, compiler-cli, core
... forms, language-service, platform-browser
... platform-browser-dynamic, router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.800.0-rc.4
@angular-devkit/build-angular      0.800.0-rc.4
@angular-devkit/build-ng-packagr   0.800.0-rc.4
@angular-devkit/build-optimizer    0.800.0-rc.4
@angular-devkit/build-webpack      0.800.0-rc.4
@angular-devkit/core               8.0.0-rc.4
@angular-devkit/schematics         8.0.0-rc.4
@bazel/bazel                       0.25.1
@bazel/ibazel                      0.10.3
@bazel/karma                       0.27.12
@bazel/typescript                  0.27.12
@ngtools/json-schema               1.1.0
@ngtools/webpack                   8.0.0-rc.4
@schematics/angular                8.0.0-rc.4
@schematics/update                 0.800.0-rc.4
ng-packagr                         5.2.0
rxjs                               6.4.0
typescript                         3.4.5
webpack                            4.30.0

Anything else relevant?

@AndrewKushnir AndrewKushnir added the area: bazel Issues related to the published `@angular/bazel` build rules label May 28, 2019
@ngbot ngbot bot added this to the needsTriage milestone May 28, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog May 28, 2019
@jelbourn jelbourn added P4 A relatively minor issue that is not relevant to core functions and removed severity1: confusing labels Oct 1, 2020
@alxhub
Copy link
Member

alxhub commented Mar 14, 2022

Closing as obsolete - the Bazel builder and associated CLI functionality are deprecated and no longer supported.

@alxhub alxhub closed this as completed Mar 14, 2022
@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 Apr 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: bazel Issues related to the published `@angular/bazel` build rules freq1: low P4 A relatively minor issue that is not relevant to core functions type: bug/fix
Projects
None yet
Development

No branches or pull requests

5 participants