Languages

React - how to check react-router version?

3 points
Asked by:
Olivier-Myers
514

Do you know how to check the version of react-router in my project?

3 answers
3 points
Answered by:
Olivier-Myers
514

Every package version is stored in the package.json file.

Simple steps:

  1. go to /path/to/my-app/package.json,
  2. search for react-router.
react-router version checking in React project.
react-router version checking in React project.
0 comments Add comment
3 points
Answered by:
Olivier-Myers
514

You can also run npm command in the project directory: 

npm list --depth=0

The above command will return a list of locally installed packages (without displaying their dependencies).

You need to find react-router package on the list, e.g. react-router@4.1.0.

0 comments Add comment
2 points
Answered by:
Olivier-Myers
514

Uder Bash you can run the command in the project directory:

npm list --depth=0 | grep preact-router | cut -d @ -f 2

Example output:

4.1.0

 

0 comments Add comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join