【发布时间】:2016-01-07 20:28:55
【问题描述】:
我正在尝试执行以下babel 安装。
$ mkdir babel-test
$ cd babel-test
$ npm init
$ npm install --save-dev babel-cli
此时,我得到了以下树。
├── package.json
├── node_modules
│ ├── babel-cli
│ ├── etc...
在这一点上,我想我可以走了。但是我得到了这个错误。
$ babel
=> -bash: /usr/local/bin/babel: No such file or directory
这些是我package.json的内容
{
"name": "babel-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"babel-cli": "^6.4.0"
}
}
我做错了什么?当然,看起来它没有在正确的目录中查找 babel。
【问题讨论】: