mswjs / interceptors

Low-level network interception library.
https://npm.im/@mswjs/interceptors
MIT License
565 stars 127 forks source link

Problems using with npx to install as a dependency #662

Closed imakeinterfaces closed 2 weeks ago

imakeinterfaces commented 1 month ago

If I try to install this package using npx with the -p flag I get an error saying Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@mswjs/interceptors' imported from

For example: npx -p @mswjs/interceptors -p @babel/core -p @babel/node babel-node

Wherein the -p packages are installed as dependencies, and the final babel-node is calling the package executable. Other packages work such as babel, dotenv etc but for some reason this package does not. Any idea why?

kettanaito commented 2 weeks ago

Hi, @imakeinterfaces. Can you submit a reproduction repo for this please?

The error you posted is a built error, not the installation error (the imported from suggests that, and it cuts at the most inconvenient place). Once you have a repo, I can look into it. Thanks.