On my CI i m currently u…
On my CI i’m currently using nx affected:build
but doing this I get the following out put:
```Some of the library ngx-translate’s dependencies have not been built yet. Please build these libraries before:
- logging Try: nx run-many –target build –projects ngx-translate,…``` and in the end the build faild due this
Responses:
That is really odd. What version of angular are you on?
Is this a v9 project. If so you may need to run ngcc on postinstall
yes it is v9
but I managed to fix this by adding –with-deps
Hmm interesting
Do you have this in your scripts?
"postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points"
}
for the record these are all deployable libs where some have dependencies on others
“postinstall”: ”ngcc –properties es2015 browser module main –first-only –create-ivy-entry-points”,
this in my root package.json
With v9 you need to make sure that your dependencies are compiles to support ivy. I’d assume that’s the issue
And the –with-deps flag will do that on the fly for deps. Of deps
Ok so ya that wasn’t the issue.
ok :slightly_smiling_face:
Good to know that the with deps flag fixes it!
Could it be that the issues is that a dependend lib wasn’t changed, but because it is a CI build it doesn’t have the compiled version in the dist
:slightly_smiling_face:
I’ll leave it on for now, if still have issues I’ll let you know
Yes that would be it. Assuming you are not running yarn install on CI? So that it never went through ngcc?
I also saw you have an affected:lib what is the diff with the build?
i’m a npm user :slightly_smiling_face:
Affected:libs gives you a list of affected libs. That’s it.
but i do an npm ci at start
ok
Npm install and yarn install will both invoke the postinstall script
On your CI after you run the npm ci command do you see the ngcc creating ivy entry points in the logs?
yes, but that is for the external libs
So you have a buildable lib that uses ngx-translate and a dependency of ngx-translate was not built right?
yes
```> nx affected:build “–parallel” “–configuration=production” “–base=origin/master~1”
> NX Running target build for projects:
- authentication
- layout
- ngx-translate
- rxjs-state
- search
- user-management
———————————————————————————————————————————————
Some of the library ngx-translate’s dependencies have not been built yet. Please build these libraries before:
- logging
Try: nx run-many –target build –projects ngx-translate,… Building Angular Package Building Angular Package```
Ohhh your lib is called ngx-translate?
as you see the list of libs that are affected, but logging wasn’t changed, but the others depend on it
Oh I see what the issue is. This isn’t an Ivy problem.
Ya you will need the with deps flag then.
yes, i have some extensions for that lib
Since a buildable lib depends on another lib but if the other lib has not been compiled the buildable lib can’t be built
and I use @scope/ngx-translate to put my extensions
That’s clear now :slightly_smiling_face: tnx!
Ya ok so you will need to build all or build –with-deps