即使在安装npm install -g gulp后也没有发现本地gulp安装 [英] No local gulp install found even after installing npm install -g 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.2.2,through2 @ 0.4.1,lodash.template@2.4.1)
在上面的脚本中,我可以看到一行
/ usr / bin / gulp - > /usr/lib/node_modules/gulp/bin/gulp.js
我想这是在bin文件夹下创建一个simulink。所以我应该在全球范围内获得大量的补偿,但是我得到了这个错误。
没有在/ var / www / ksapp中找到本地gulp安装
任何想法为什么我得到这个错误。
谢谢
正如文档中指出的那样,您应该在全球范围内安装它(您是这么做的)和把它添加到你的项目dev deps(本地):
npm install gulp --save-dev
I tried to install gulp by
npm install -g gulp
The output seems to be something like this. (i have skipped some logs)
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)
In the above script i can see a line /usr/bin/gulp -> /usr/lib/node_modules/gulp/bin/gulp.js which i guess is making a simulink in bin folder. So i should be getting gulp globally but i get the this error.
No local gulp install found in /var/www/ksapp
Any idea why i am getting this error.
Thanks
As pointed out in the doc, you should install it globally (you did that) and add it to your project dev deps (locally):
npm install gulp --save-dev
这篇关于即使在安装npm install -g gulp后也没有发现本地gulp安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!