npm install 就是安装模块,npm run dev 就是执行npm script中的命令.当我们执行npm命令的时候,它到哪里去找,这就要说到每个node项目中都有的核心文件package.json 文件. 项目开始时,我们就要建立这个文件.假设我们要创建一个node 项目,我们会新建一个文件夹命名node, 这时我们就要创建package.json文件.进入node 文件夹,你可以手动创建,就和创建一个txt文件一样,但我们一般都会使用命令创建,打开cmd 窗口,输入npm ini
npm init: For create package.json file which will recode the dependence. npm install: You can also write like: npm i This is a shortcut way to write npm install. For example. we want to install undersocre.js npm install -S underscore The way '-S' wor
Historically, the npm init command was solely use to create a new package.json file. However, as of npm version 6.1, you can now use a new feature of npm init called the . The initializer you provide will determine how your new application will be bu