找不到 gulp 命令 - 安装 gulp 后出错 [英] gulp command not found - error after installing gulp
问题描述
我已经使用全局和本地安装了 gulp
npm install gulpnpm install gulp -gnpm install gulp-utilnpm install gulp-util -g
当尝试运行 gulp 我得到 p>
'gulp' 不是内部或外部命令、可运行程序或批处理文件.
运行 npm list gulp(或 -g),我 gulp@3.7.0
使用我的全局或本地 gulp 安装位置.
我试过运行 node gulpfile.js
指向我的 gulpfile,它运行没有错误,当然,它以 require('gulp')
开头.
关于让 gulp 在 Windows(8.1) 上运行有什么建议吗?
你忘记安装 gulp-cli 包了:
npm install -g gulp-cli
然后你可以从命令行运行命令gulp".
I've installed gulp both globally and locally using
npm install gulp
npm install gulp -g
npm install gulp-util
npm install gulp-util -g
When try to run gulp i get
'gulp' is not recognized as an internal or external command, operable program or batch file.
Running npm list gulp (or -g), I gulp@3.7.0
with the location of either my global or local gulp installation.
I've tried running node gulpfile.js
pointed to my gulpfile, and it runs without error, and of course, it starts with require('gulp')
.
Any suggestions on getting gulp working on Windows(8.1)?
You forgot to install the gulp-cli package:
npm install -g gulp-cli
Then you can run the command "gulp" from the command line.
这篇关于找不到 gulp 命令 - 安装 gulp 后出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!