Error: Cannot find module ‘rxjs/operators’ while running npm installed package

  Kiến thức lập trình

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:

  1. Ran the steps on different versions of the node.
  2. npm cache clean --force
  3. Reinstalled node
  4. Cleared node_modules
  5. Rebuilt the package

Nothing worked. Is there anything specific I should try to fix this?

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT