-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[Bug] Angular builder cannot find built dependent libs #2479
Comments
So angular builder should resolve The steps should be:
"architect": {
"build": {
"builder": "@nrwl/angular:package",
"options": {
"tsConfig": "libs/utils/tsconfig.lib.json",
"project": "libs/utils/ng-package.json" // <-- Locate ng-package.json first
}
},
}
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "./dist", // <-- Read this prop
"lib": {
"entryFile": "src/index.ts"
}
} Now we can use that path to find Please let me know if this is enough - I might work on PR for this change =) |
outputPath
optionNow all libs build into global `dist` folder due to bug nrwl/nx#2479
Now all libs build into global `dist` folder due to bug nrwl/nx#2479
Are there any workarounds for this? |
@florianehmke my workaround for now is keeping the output path as default and then after build executing script to copy assets back to where I needed them. |
Hi Author, |
The problem here is that the Basically right now a lib config might look like this:
By default everything works out of the box. If someone changes the
|
As stated in nrwl/nx#2479 (comment) the "outputs" property needs to be assigned in the angular.json when a default path is changed in the ng-package.json. However I did not change the path so I think something else is wrong here. I opened an Issue nrwl/nx#5840.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Prerequisites
Expected Behavior
Builder
@nrwl/angular:package
should be able to locate built dependent libraries in custom locations (not indist/libs/<lib-name>
) if library output path was changed in it'sng-package.json
'sdest
property.Current Behavior
Right now builder
@nrwl/angular:package
has hardcoded path to resolve all dependent libs from path that looks likedist/libs/<lib-name>
:nx/packages/angular/src/builders/package/package.impl.ts
Lines 55 to 60 in f232a43
Failure Information (for bugs)
When building a library via
@nrwl/angular:package
builder that has another library as dependency that is also built with@nrwl/angular:package
and it's output path was modified then build fails with:Steps to Reproduce
lib1
lib2
lib1
intolib2
ng-package.json
file oflib1
to changedest
property to other location (./dist
) instead of default../../dist/libs/lib1
ng build lib1
to build dependency firstng build lib2
and watch it fails even when we built it's dependencylib1
Context
The text was updated successfully, but these errors were encountered: