简体   繁体   English

如何使用 create-react-app 安装以前的 react.js 版本?

[英]How to use create-react-app to install previous react.js versions?

I want to use one previous version of react (16.0.0) but couldn't find any way to install previous version by using "create react app" .我想使用一个以前版本的反应 (16.0.0) 但找不到任何方法来使用"create react app"安装以前的版本。

One answer on this topic was posted in stackoverflow that says that I need to install the latest version by using "create react app" then I need to edit package.json file and specify my desired version (react & react-dom) and run npm install command.关于这个主题的一个答案发布在 stackoverflow 上,它说我需要使用“create react app”安装最新版本,然后我需要edit package.json file并指定我想要的版本(react 和 react-dom)并运行npm install命令.

But couldn't get my desired version.但无法获得我想要的版本。 It's still the current version (17.0.2).它仍然是当前版本 (17.0.2)。 Can anyone fix the issue please?任何人都可以解决这个问题吗?

delete.lock file and then try installing packages删除.lock 文件,然后尝试安装包

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

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