9

I need help to find which version of Babel is on my Windows Machine. I have installed it using

npm install --save-dev babel-cli babel-preset-env.

How do I check which version is on my Windows OS?

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Waltham WECAN
  • 481
  • 4
  • 11
  • 26

6 Answers6

4

After you finish installing Babel, your package.json file should look like this:

{
  "name": "my-project",
  "version": "1.0.0",
  "devDependencies": {
    "babel-cli": "^6.0.0"
  }
}

So you can find your Babel version in this configuration file.

Andrii Pryimak
  • 797
  • 2
  • 10
  • 33
3

Try this at the command line:

npm list babel-cli
koen
  • 5,383
  • 7
  • 50
  • 89
2

You can also check the version of babel-cli by finding the babel-cli folder in node_modules and looking at the version property of the package.json that is at the base of that folder.

If babel-cli was installed globally via -g flag of npm install, you could check the version by executing command babel --version.

Hopefully the helps!

Alexander Staroselsky
  • 37,209
  • 15
  • 79
  • 91
2

As the babel is updated to babel 7, check using npm list @babel/cli or npm list @babel/core

Nitin Kumar
  • 1,448
  • 2
  • 13
  • 19
1

possibly your local ./node_modules/.bin is not in $PATH check out this previous question for further info.

Capicuaman
  • 11
  • 3
0

babel --version

You can figure this out by typing in the command line:

babel --help, look over the output and you can see other options that you might need.

Good luck

JORDANO
  • 726
  • 8
  • 17