1.在项目文件夹下打开gitbash 2.npm init 进行初始化 3.按照提示一步步操作 4.yes 最后会在项目所在文件夹下生成一个package.json文件 转载于:https://www.cnblogs.com/wanglinyu/p/8376711.html