'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".

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.

But couldn't get my desired version. It's still the current version (17.0.2). Can anyone fix the issue please?



Solution 1:[1]

delete .lock file and then try installing packages

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 pranav patil