Modules (in the C++ terminology) and a package manager like npm are two different beasts.
Modules are not part of C++17, although Clang and MSVC both bake their own bread with implementation of the current modules draft.
There are still issues being worked out. They are solvable, but there is a challenge in getting consensus on a particular set of decisions about how to implement modules.