npm install takes 3 exclusive, optional flags which save or update the package version in your main package.json: -S, --save: Package will appear in your dependencies. -D, --save-dev: Package will appear in your devDependencies. -O, --save-optional:…