linux - 即使在安装 npm install -g gulp 后也找不到本地 gulp 安装

我尝试通过

安装 gulp
npm install -g gulp

输出似乎是这样的。 (我跳过了一些日志)

npm http 304 https://registry.npmjs.org/string_decoder
npm http 304 https://registry.npmjs.org/lodash._htmlescapes
/usr/bin/gulp -> /usr/lib/node_modules/gulp/bin/gulp.js
gulp@3.6.2 /usr/lib/node_modules/gulp
├── tildify@0.2.0
├── pretty-hrtime@0.2.1
├── deprecated@0.0.1
├── archy@0.0.2
├── semver@2.2.1
├── chalk@0.4.0 (has-color@0.1.7, ansi-styles@1.0.0, strip-ansi@0.1.1)
├── orchestrator@0.3.3 (sequencify@0.0.7)
├── liftoff@0.9.8 (extend@1.2.1, minimist@0.0.8, resolve@0.6.3, findup-sync@0.1.3)
├── vinyl-fs@0.1.4 (graceful-fs@2.0.3, map-stream@0.1.0, mkdirp@0.3.5, vinyl@0.2.3, glob-stream@3.1.9, glob-watcher@0.0.6)
└── gulp-util@2.2.14 (lodash._reinterpolate@2.4.1, dateformat@1.0.7-1.2.3, minimist@0.0.8, vinyl@0.2.3, multipipe@0.0.2, through2@0.4.1, lodash.template@2.4.1)

在上面的脚本中我可以看到一行 /usr/bin/gulp ->/usr/lib/node_modules/gulp/bin/gulp.js 我猜这是在 bin 文件夹中创建一个 simulink。所以我应该在全局范围内得到 gulp 但我得到了这个错误。

No local gulp install found in /var/www/ksapp

知道为什么我会收到此错误。

谢谢

最佳答案

As pointed out in the doc ,您应该全局安装它(您已经这样做了)将它添加到您的项目开发部门(本地):

npm install gulp --save-dev

https://stackoverflow.com/questions/23284805/

相关文章:

linux - 如何更改 Ubuntu 中的默认 GCC 编译器?

python - 为什么 python setup.py 在 Travis CI 上说无效命令 'b

linux - 我的环境变量是什么?

python - 如何在 Python 中获取 PATH 环境变量分隔符?

python - django 测试应用程序错误 - 创建测试数据库时出错 : permission

python - Queue.Queue 与 collections.deque

python - 如何让 Pylint 识别 NumPy 成员?

linux - 发送电子邮件的 Shell 脚本

android - adb 设备命令不起作用

python - 从动态导入的模块中的类的字符串名称动态实例化?