[NPM] Create a new project using the npm init <initializer> command
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 built. npm will prepend create- to the name of the initializer and it'll use npx to temporarily install and execute that project.
npx create-react-app playground
What it does is install 'create-react-app' temporality, and use it to init a new react application called 'playground'.
For npm v6.1 above, you can use 'npm init' to create a new application.
npm init <initializer>can be used to set up a new or existing npm package.
initializerin this case is an npm package namedcreate-<initializer>, which will be installed bynpx, and then have its main bin executed -- presumably creating or updatingpackage.jsonand running any other initialization-related operations. Link
Which means if you do:
npm init react-app playground
equals to:
npx create-react-app playground
[NPM] Create a new project using the npm init <initializer> command的更多相关文章
- Mac 安装node npm cnpm vue 以及卸载 node 和 npm 的方法 清空npm缓存的方法
S01 安装node(内含npm) 首先,到官网下载长期支持版,截止目前,最新的长期支持版本号是10.16.3 https://nodejs.org/zh-cn/download/ 下载完毕后,安装该 ...
- npm 使用过程中报错问题-及npm使用
原文地址:https://blog.csdn.net/u013022210/article/details/77740519 1.以下为报错具体详情:node 8.1.2 版本问题:其他空间安装成功但 ...
- koa2第一天 安装koa2found 1 low severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details
安装全局koa2:npm install -g koa2 -generator 创建一个koa2文件夹:koa2 -e koa2 进入koa2文件夹:cd koa2 安装npm模块:npm insta ...
- command failed: npm install --loglevel error --registry=https://registry.npm 用vue-cli 4.0 新建项目总是报错
昨天新买的本本,今天布环境,一安装vue-cli发现都4.0+的版本了,没管太多,就开始新建个项目感受哈,一切运行顺利,输入 "vue create app" 的时候,一切貌似进展 ...
- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-cli) on project standalone-pom: Unable to parse configuration of 3: mojo org.apache.maven.plugins:
问题: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (defau ...
- found 12 vulnerabilities (7 moderate, 5 high) run `npm audit fix` to fix them, or `npm audit` for details
npm 安装包之后,如果出现类似下面的信息 found 12 vulnerabilities (7 moderate, 5 high) run `npm audit fix` to fix them, ...
- npm run dev 报错 run `npm audit fix` to fix them, or `npm audit` for details
前几天写的直接运行npm run dev还是ok的,突然不行了,前面报错是css-loader没有,删除style标签上的lang='scss'就好了,先不需要这个依赖.这个先不管. 只是后面的 ru ...
- run `npm audit fix` to fix them, or `npm audit` for details
问题 added 246 packages from 681 contributors and audited 382 packages in 17.509s found 13 vulnerabili ...
- Nodejs的npm安装模块时候报错:npm ERR! Error: CERT_UNTRUSTED的解决方法
npm http GET https://registry.npmjs.org/grunt-cli npm http GET https://registry.npmjs.org/grunt-cli ...
随机推荐
- django 模板中{%for%}的使用
1.{%for athlete in list reversed%} reversed用于反向迭代 2.for 标签 支持一个可选的 empty 变量 3.forloop 模板变量 4.forloo ...
- No-2.常用 Linux 命令的基本使用
常用 Linux 命令的基本使用 01. 学习 Linux 终端命令的原因 Linux 刚面世时并没有图形界面,所有的操作全靠命令完成,如 磁盘操作.文件存取.目录操作.进程管理.文件权限 设定等 在 ...
- check.pl
比对两个文件并纠错 #!/usr/bin/perl use strict; use warnings; ###############################################m ...
- luogu P2865 路障
https://www.luogu.org/problemnew/show/P2865 看到题解好多dijkstra,作为一名钟爱于spfa的蒟蒻看不下去了. 有些spfa要跑两边,代码量要曾长好多( ...
- 常用mysql
搜索差价 select count(*) from gate_okex_cj; select * from (select count(*) as a_cj,coin from gate_okex_c ...
- [转]Selenium-Webdriver系列Python版教程(1)————快速开始
elenium的历史,selenium2与WebDriver的关系本文就不讲了,想了解的同学们百度一下就可以Ok. 本系列教程是以Selenium-WebDriver的Python版本,首先从 ...
- 图论trainning-part-1 D. Going in Cycle!!
D. Going in Cycle!! Time Limit: 3000ms Memory Limit: 131072KB 64-bit integer IO format: %lld Ja ...
- vs code 使用心得
Jetbrains 家族的软件适合java,python开发,但是对与rust,shell等的开发,则显得有些臃肿,需要一款轻快的编辑器,经过挑选,在sublime3 与 vs code 中选则了vs ...
- The Grove(poj 3182)
题意:一个n*m(n,m<=50)的矩阵有一片连着的树林,Bessie要从起始位置出发绕林子一圈再回来,每次只能向横着.竖着或斜着走一步.问最少需多少步才能完成. /* 如果我们用搜索来写的话, ...
- 7.1——函数的定义,参数传递,return语句
函数的定义: (1)函数体是一个作用域,函数体是一个语句块,定义了函数的具体操作 (2)函数的形参类似于局部变量,只是区别是它是在函数的形参列表中定义的. (3)C++是一种静态强类型语言,对于每一次 ...