'How can I use npmjs version of my library in NX?

I have a NX Monorepo.

In my project I want to import @org/mylib from npmjs rather than using the local version.

What are my options?

I have already published my library to NPMJS. And i am able to install it using npm i @org/mylib



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source