admin管理员组文章数量:1355658
I need to create a new react application with create-react-app
version 1.0.10. However, when I do create-react-app myProject
it automatically uses the latest version of create-react-app
available at that time. Is there any mands available to make create-react-app use a specific version to create a project template?
I need to create a new react application with create-react-app
version 1.0.10. However, when I do create-react-app myProject
it automatically uses the latest version of create-react-app
available at that time. Is there any mands available to make create-react-app use a specific version to create a project template?
-
Did you try installing 1.0.10?
npm install [email protected]
? Most likely it's installed globally so you'd have to install it locally and then run it from there. – Henrik Andersson Commented Aug 6, 2017 at 8:03 - you mean installing it locally in a project? – Dani Akash Commented Aug 6, 2017 at 8:27
-
2
create-react-app
is a global package, so you have 1 version of that package installed globally on your machine and wherever you are in your puter, you can typecreate-react-app myProject
. As @HenrikAndersson suggested, if you install globally a specific version:npm -g install [email protected]
every time you use it, it's going to be that version – maxgallo Commented Aug 6, 2017 at 9:17 - You could specify "create-react-app":"1.0.10." in package.json, and then do "npm install" and then it should install the package for you(note this is without the package being installed already). – Dream_Cap Commented Aug 6, 2017 at 9:30
1 Answer
Reset to default 5You will need to run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
this will only work in in a project that has not been ejected yet, read this for more info
本文标签: javascriptHow to create a react project with specific version of createreactappStack Overflow
版权声明:本文标题:javascript - How to create a react project with specific version of create-react-app? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744026081a2578063.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论