我一直在尝试建立一个angular js项目,和yo,grunt和generator-grunt angular。虽然我安装了所有的包,但是没有找到gulp命令,但是如果我进入node_modules,它就可以工作了。
下面的代码将解释我的问题:
$ npm -v
# 2.5.1
$ npm install -g yo
$ npm install -g generator-gulp-angular
$ mkdir client && cd $_
$ yo gulp-angular ng_demo
$ gulp serve
# command not found
$ node_modules/gulp/bin/gulp.js serve
# works我正在使用zsh。可能出了什么问题?
发布于 2015-05-07 06:25:14
检查您是否全局安装了gulp:
npm install -g gulp另一个想法是将scripts添加到您的package.json文件中,如下所示:
{
"name": "testing-app",
"version": "0.9",
"scripts": {
"gulp": "gulp",
"serve": "gulp serve"
}
}然后使用npm run serve...
https://stackoverflow.com/questions/30088550
复制相似问题