Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nrwl build Library Error: File is not under rootDir

Tags:

nrwl

nrwl-nx

The error occurs when I use the library in another library. Library import is working fine in the app but not working within libraries. And not able to generate the build of a library. All libraries are publishable.

Error:

Error

Nrwl.v13 Files Structure within lib folder:

Nrwl.v13 Files Structure within lib folder

like image 456
Shahzaib Imran Avatar asked Oct 25 '25 05:10

Shahzaib Imran


1 Answers

I had this issue in one of our monorepo and it was caused by the fact that one of our library's name wasn't valid. We had something like @organisation/test-utils/e2e which we ended up renaming to @organisation/test-utils-e2e (take note of the / usage).

like image 55
Kevin Pastor Avatar answered Oct 28 '25 03:10

Kevin Pastor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!