The react-dom
problem is not fixed when you press npm -v react-dom
, it gives the version version of npm
not react-dom
, you can verify that with npm -v
or npm -v react-dom
you will issue the same result. You are not checking the package version correctly.
How to set the reaction and reaction?
Use this to set the reaction and response:
npm install react react-dom
After that, you can check your package.json
file, if the reaction and reaction were installed correctly, you will find an entry for this.
How to check the installation package version?
To check all versions of locally installed packages:
npm list
For public packages, use -g as well:
npm list -g
To check the version of a specific package, also specify the name of the package:
npm list PackageName For Example => npm list react npm list react-router
After installation, your package.json
will look like this:
{ "name": "***", "version": "1.0.0", "main": "***", "scripts": { .... }, "repository": { .... }, "keywords": [], "author": "", "dependencies": { .... "react": "^15.4.2", //react "react-dom": "^15.4.2", //react-dom .... }, "devDependencies": { .... } }
Latest react-dom
version: 15.4.2
Link: https://www.npmjs.com/package/react-dom