[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.
initializer
in this case is an npm package namedcreate-<initializer>
, which will be installed bynpx
, and then have its main bin executed -- presumably creating or updatingpackage.json
and 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 ...
随机推荐
- 浏览器title失去焦点时改变title
document.addEventListener('visibilitychange', function() { var isHidden = document.hidden; if (isHid ...
- 让idea调试不进入class文件中去
- JAVA用freemarker生成复杂Excel。(freemarker)
在生成Excel的时候,大多时候都是使用poi,jxl等进行的,但是对于复杂的Excel来说,这个工作量是非常的大的,而且,对于我这么懒的人来说,这是相当痛苦的一件事情,所以,我不得不找找有没有简单一 ...
- MariaDB数据库(一)
1.数据库简介 1.1 什么是数据库? 简单的说,数据库就是一个存放数据的仓库,这个仓库是按照一定的数据结构(数据结构是指数据的组织形式或数据之间的联系)来组织,存储的,我们可以通过数据库提供的多种方 ...
- Linux用户和组的概念
目 录 第1章 用户和组存在的关系 1 1.1 我们现在所使用的操作系统都是多用户操作系统 1 1.2 id命令查看当前登陆的用户信息 1 1.3 用户UID的分类 1 1.4 ...
- 为公司架构一套高质量的 Vue UI 组件库
有没有曾遇过,产品要我们实现一个功能,但是 iview 或者 elementui 不支持,我们然后义正言辞的说,不好意思,组件库不支持,没法做到. 有没有曾和设计师争论得面红耳赤,其实也是因为组件库暂 ...
- 分分钟钟学会Python - 模块
目录 模块 1 模块基础知识 2 random 返回随机生成的一个实数 3 hashlib 摘要算法模块 Hmac算法 4 time /datetime 时间模块 5 getpass 密码不显示(只能 ...
- POJ 2377 (并查集+sort求最远路)
Description Bessie has been hired to build a cheap internet network among Farmer John's N (2 <= N ...
- POJ 2728 Desert King(最优比率生成树, 01分数规划)
题意: 给定n个村子的坐标(x,y)和高度z, 求出修n-1条路连通所有村子, 并且让 修路花费/修路长度 最少的值 两个村子修一条路, 修路花费 = abs(高度差), 修路长度 = 欧氏距离 分析 ...
- javax.servlet.jsp.JspTagException: Neither BindingResult nor plain target object for bean (蛋疼死我了)
1为抛出异常原因,2为异常解决方法. 原因: 进入spring:bind标签源码你可以看到 Object target = requestContext.getModelObject(beanNa ...