Warning while building library
See original GitHub issueπ Bug report
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- xi18n
- run
- config
- help
- version
- doc
Description
When we create a library named my-lib, angular cli adds the following to tsconfig.json:
"my-lib": [
"dist/my-lib/my-lib",
"dist/my-lib"
]
When we build the library using ng build my-lib
, we see the following warning several times in the console:
Warning: The basePath "/somepath/my-workspace/dist/my-lib/my-lib.d.ts" computed from baseUrl "/somepath/my-workspace" and path mapping "/somepath/my-workspace/dist/my-lib/my-lib.d.ts" does not exist in the file-system.
It will not be scanned for entry-points.
In the end, the build succeeds, but the warning is annoying. It was printed 9 time while building.
π¬ Minimal Reproduction
ng new my-workspace --create-application=false
cd my-workspace
ng generate library my-lib
ng build my-lib
π Your Environment
Angular CLI: 9.1.0
Node: 13.12.0
OS: linux x64
Angular: 9.1.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.901.0
@angular-devkit/build-angular 0.901.0
@angular-devkit/build-ng-packagr 0.901.0
@angular-devkit/build-optimizer 0.901.0
@angular-devkit/build-webpack 0.901.0
@angular-devkit/core 9.1.0
@angular-devkit/schematics 9.1.0
@angular/cli 9.1.0
@ngtools/webpack 9.1.0
@schematics/angular 9.1.0
@schematics/update 0.901.0
ng-packagr 9.1.0
rxjs 6.5.5
typescript 3.8.3
webpack 4.42.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Lots of warnings when building with Xcode 7 with 3rd party ...
I am getting a large number of warnings when compiling my project in Xcode 7 GM (bitcode is NOT enabled) in regards to...
Read more >Module never used warning while building Angular 9 library
Recently I updated one of my projects from Angular 8 to Angular 9. When I try to build the library IΒ ...
Read more >Linker warning when building managed extension - Visual C++
This article provides information about resolving linker warnings when you build managed extensions for C++ DLL projects.
Read more >Build Scripts - The Cargo Book
Other packages need to link to C libraries which can either be located on the ... When the build script is run, there...
Read more >List of the armlink error and warning messages - Arm Developer
The linker can recognize object files in ELF format and library files in AR format. ... An I/O error occurred while creating the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Annie-Huang, this has been closed as it was fixed via https://github.com/angular/angular/pull/36525
The fix will be available in 9.1.2
Yes, the above warning can be ignored.
What confuses me is that I still get the warning when I move the paths from the base tsconfig to tsconfig.app.json. I donβt want the path mappings to be available to my library (Iβll just use relative paths), I only want it available to my app.
In fact. it still happens if I remove all paths from all tsconfig files???
Why do I still get the warnings?