Npm by default uses global values when initializing a new package.json file. Learn how to set your own global default values by command line or editing the ~/.npmrc file.


 




npm set init.author.email "xxx@gmail.com"
npm set init.author.name "XXX"
npm set init.license "MIT"


 

Run:



npm init -y


Should bring all the init default value for you.