Prevent ua-parser-js install during npm install


I was wondering if its possible to prevent the install of ua-parser-js while executing the command - “npm install”.

I see that the parser is present as devDependency in package.json of stream-http module of the various node_modules that gets downloaded automatically during npm install. Hence, I was thinking if we have a way to control or prevent this dependency install.

Looking forward to getting assistance in this.

1 Like

Hey @Tanveer178 and welcome to the Community! The author of the package marked it as a development dependency, which means it’s probably handy or even required to have the package installed during development. If you’re ready to install in your production environment make sure to add the --production flag to npm install which prevents the development dependencies from being installed. More context in the NPM docs: npm-install | npm Docs .