Follow the official website of `babel` for basic installation and configuration in `cli`, and there is a problem.

I followed the configuration document on the official website and chose the CLI method, which was full of problems at that time.

I ran the following command under node 10.12.0, npm 6.4.1, windows7 environment:

   

I @ babel/core is obviously the 7.0.0 version, why did something go wrong and how to solve it?

Sep.27,2021

with this usage guide , it can be done successfully.

npm install --save-dev @babel/core @babel/cli @babel/preset-env
The reason for

is that the naming system has changed since babel version 7. npm install-- save babel-cli will be loaded with 6.x version, not the latest version 7.

Menu