当我在我的终端中键入create-react-app my-app
命令时,它似乎工作了-成功下载所有库等。然而,在该过程结束时,我得到一条消息,即template was not provided
. conf。
输入
user@users-MacBook-Pro-2 Desktop% create-react-app my-app
输出
Creating a new React app in /Users/user/Desktop/my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
..... nothing out of the ordinary here .....
✨ Done in 27.28s.
A template was not provided. This is likely because you're using an outdated version of create-react-app.
Please note that global installs of create-react-app are no longer supported.
在包中。my-app
的json:
"dependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "3.3.0" <-- up-to-date
}
我检查了CRA 更新日志,它看起来像是添加了对自定义模板的支持-然而,命令create-react-app my-app
看起来并没有改变。
知道这是怎么回事吗?