question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Buildable libraries dependent upon shared libraries

See original GitHub issue

In Nx (v13.8.x), how can I have a buildable library that is dependent upon another shared library?

Scenario:

I have two libraries:

  1. React App ‘a1’
  2. React lib ‘r1’: buildable, publishable
  3. JS lib ‘ts1’; typescript only, not buildable, not publishable

Dependency:

  • a1 -> r1 -> ts1 (when building app)
  • r1 -> ts1 (when build r1)

When I build the application a1, then the compile and bundling all work! When I attempt to build r1 directly, I get a ‘rootDir’ error:

Error

Error during bundle: Error:

libs/r1/src/lib/libs-r1.tsx(2,23): semantic error TS6059: File 
'libs/ts1/src/index.ts' is not under 'rootDir' 'libs/r1/src'. 

'rootDir' is expected to contain all source files.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
cre8commented, Mar 30, 2022
0reactions
github-actions[bot]commented, Jun 14, 2022

This issue has been automatically marked as stale because it hasn’t had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Buildable and Publishable Libraries - Nx
Buildable libraries are similar to "publishable libraries" described above. Their scope however is not to distribute or publish them to some external registry....
Read more >
Extending with Shared Libraries - Jenkins
Pipeline has support for creating "Shared Libraries" which can be defined in external source control repositories and loaded into existing Pipelines.
Read more >
Dependency graph enhancements, ESLint plugin, buildable ...
In Nx 9.1, we've added a lot of improvements regarding buildable libraries, fixing a lot of edge cases when one buildable library depended...
Read more >
Inter-library dependencies (Libtool) - GNU.org
An inter-library dependency is where a library depends on other libraries. ... In these systems, programs may depend on shared libraries, but shared ......
Read more >
Manage Shared Libraries with Environment Variables
Shared libraries are loaded at runtime. The application executable needs to know where to find the required shared libraries when it runs. Depending...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found