Install NodeJS, and then check the version numbers of node and npm on the command line. If there are no problems, talk about installing babel
Remember to select "Add to PATH" when installing Node, so that modules installed through npm install -g can be run directly on the command line (it seems to be selected by default, it is best to check)
Check after installation is complete
Then install babel-cli
npm install -g babel-cli
Finally, use babel --version to check the version of babel. Once found, there will be no problem.
Put out the error message next time. If there is no error message, who knows the reason for the error.
Install NodeJS, and then check the version numbers of node and npm on the command line. If there are no problems, talk about installing babel
Remember to select "Add to PATH" when installing Node, so that modules installed through
npm install -g
can be run directly on the command line (it seems to be selected by default, it is best to check)Check after installation is complete
Then install babel-cli
Finally, use
babel --version
to check the version of babel. Once found, there will be no problem.