How does win10 install and use babel?

  node.js, question

Help! After one day of installation, babel could not be installed. I opened the installation directory and found relevant contents, but cmd could not find version number. I don’t know how to use it. Is there any elder brother who kindly helps me? ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
Is the place where I compiled wrong? If not in CMD, where should it be? My nodejs is not in the C disk, or do you want to put it in the C disk?

I can’t upload pictures. . Ahhh, anyway, I installed jade, but jade can work. But babel can’t

图片描述

In this way, my jade can find the version number and compile files. Babel can’t. . .

Install NodeJS, and then check the version numbers of node and npm on the command line. if there is no problem, we will discuss the problem of installing babel again.

When installing Node, remember to select “Add to PATH” for later approval.npm install -gThe installed modules can be run directly on the command line (it seems that they are selected by default, so it is better to check them)

clipboard.png

Check after installation

clipboard.png

Then install babel-cli

npm install -g babel-cli

Finally passedbabel --versionCheck babel’s version, and there will be no problem.

The next time the problem puts out an error message, who knows what caused the error if there is no error message.