简体   繁体   English

如何使用特定版本的create-react-app创建react项目?

[英]How to create a react project with specific version of create-react-app?

I need to create a new react application with create-react-app version 1.0.10 . 我需要使用create-react-app版本1.0.10创建一个新的react应用程序。 However, when I do create-react-app myProject it automatically uses the latest version of create-react-app available at that time. 但是,当我执行create-react-app myProject它会自动使用当时可用的最新版本的create-react-app Is there any commands available to make create-react-app use a specific version to create a project template? 是否有任何命令可以使create-react-app使用特定版本来创建项目模板?

You will need to run: 你需要运行:

npm install --save --save-exact react-scripts@1.0.10

or 要么

yarn add --exact react-scripts@1.0.10

this will only work in in a project that has not been ejected yet, read this for more info 这只适用于尚未弹出的项目,请阅读此内容以获取更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM