未找到 gulp 命令 - 安装 gulp 后出错 [英] gulp command not found - error after installing gulp

查看:61
本文介绍了未找到 gulp 命令 - 安装 gulp 后出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用

在全局和本地安装了 gulp

npm install gulpnpm install gulp -gnpm 安装 gulp-utilnpm install gulp-util -g

尝试运行 gulp 时,我得到

'gulp' 不是内部或外部命令,也不是可运行的程序或批处理文件.

运行 npm list gulp(或 -g),我 gulp@3.7.0 使用我的全局或本地 gulp 安装位置.

我试过运行 node gulpfile.js 指向我的 gulpfile,它运行没有错误,当然,它以 require('gulp') 开头.

关于在 Windows(8.1) 上使用 gulp 有什么建议吗?

解决方案

您忘记安装 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆