Skip to content

Publishing node_modules? #534

Answered by dianjuar
m3Lith asked this question in Q&A
Aug 7, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

That's a good question.

My experience with Nx tells me that you need to list the dependencies of your library on the library's package.json.

That doesn't mean that you will remove the dependencies from the workspace root. The dependencies on the library's package.json indicate NPM what it needs to install when installing your library. That process is automatically managed by npm when installing your library.

If you don't do that and you are using RxJs, for instance, what would happen is that in run time, your library will throw an exception indicating that RxJs was not found.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@dianjuar
Comment options

@dianjuar
Comment options

@dianjuar
Comment options

Answer selected by m3Lith
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants