8

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
  • 52,940
  • 19
  • 125
  • 157
Waltham WECAN
  • 441
  • 3
  • 10
  • 25

6 Answers6

3

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
  • 757
  • 2
  • 10
  • 32
3

Try this at the command line:

npm list babel-cli
koen
  • 4,902
  • 6
  • 42
  • 80
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
  • 34,046
  • 11
  • 71
  • 88
2

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

Nitin Kumar
  • 1,368
  • 2
  • 12
  • 18
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
  • 710
  • 8
  • 17