I have both Yarn and NPM installed but whenever I try to create-react-app it automatically uses Yarn.
I tried to run create-react-app app --use-npm
but then it created it using an older version of node and NPM.
I then tried updating the node and NPM version and ran npm -v
which showed the latest version but again after running create-react-app app --use-npm
it got created with older versions devoid of latest features of the create-react-app.
I want to use NPM and create the react app using all the latest versions of node and NPM without removing Yarn from my system. Where I am going wrong and what are the possible solutions?
When you want to use npm
, go to the project folder:
yarn.lock
node_modules
npm install
It will use the latest npm
installed on yours system.