search

Home  >  Q&A  >  body text

node.js - win10如何安装并使用babel?

救命啊。安装了一天了,babel都安装不上,我打开安装目录看,里面有相关内容,但是cmd查不到version号。也不知道该怎么使用。有没有哪位大哥好心帮一下我啊!!!!!!!!!!!!!!!!!!
我编译的地方不对吗?如果不是在CMD,应该在哪里?我的nodejs不是在C盘,还是说要放在C盘?

我上传不了图片。。啊啊啊啊,总之就是我安装了jade,但是jade能用。但是babel不行

就是这样,我的jade能查到版本号,也能编译文件。babel不行。。。

怪我咯怪我咯2776 days ago627

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 14:49:12

    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.

    reply
    0
  • Cancelreply