[NPM][Appium] Restrict installed module size

I found https://github.com/appium/appium/issues/9912 and I learned the npm‘s --production flag to reduce the module size.

Install without devDependencies

$ npm install --production

https://docs.npmjs.com/cli/install#description

With the –production flag (or when the NODE_ENV environment variable is set to production), npm will not install modules listed in devDependencies.

Remove devDependencies resources

https://docs.npmjs.com/cli/prune

$ npm install
$ cd node_modules/appium
$ npm prune --production

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.