npm add dependency to package.json code example Example: npm install and add to dependancies npm i packageName -save