I have written a typescript tool and published the package to an artifactory. When I install the package like npm install -g @org/[email protected]
The package is installed successfully but when I try to run it like my-tool -v
from the terminal, I get the following error:
node:internal/modules/cjs/loader:1251
throw err;
^
Error: Cannot find module 'rxjs/operators'
Require stack:
The same steps when I do it on a windows machine, everything works.
I tried the following:
- Ran the steps on different versions of the node.
npm cache clean --force
- Reinstalled node
- Cleared node_modules
- Rebuilt the package
Nothing worked. Is there anything specific I should try to fix this?