gulp必须安装在项目本地吗?
发布于 9 年前 作者 yakczh 6624 次浏览 最后一次编辑是 8 年前 来自 问答

http://stackoverflow.com/questions/24027551/gulp-command-not-found-error-after-installing-gulp

npm install -g gulp 然后在某个项目目录下执行 gulp 提示

[11:27:08] Local gulp not found in xxx [11:27:08] Try running: npm install gul

3 回复

按官方的Getting Started里写的看,全局和项目都要安装 https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md

到这一步出错了 npm http 200 http://registry.npmjs.org/gulp-clean npm ERR! Error: No compatible version found: gulp-clean@’^0.3.1’ npm ERR! Valid install targets: npm ERR! [“0.1.1”,“0.1.2”,“0.1.3”,“0.2.0”,“0.2.1”,“0.2.2”,“0.2.3”,“0.2.4”,“0.3.0”,“0.3.1”] npm ERR! at installTargetsError ( \node_modules\npm\lib\cache.js:709:10) npm ERR! at nodejs\node_modules\npm\lib\cache.js:631:10 npm ERR! at saved ( nodejs\node_modules\npm\node_modules\npm-registry-client\lib\get.js:138:7 npm ERR! at Object.oncomplete (fs.js:107:15) npm ERR! If you need help, you may report this log at: npm ERR! http://github.com/isaacs/npm/issues npm ERR! or email it to: npm ERR! npm-@googlegroups.com

这是版本不对吗? 我的nodejs版本是0.10.7 npm版本是1.2.21

要看nodejs 的 config prefix路径对不对。还要看环境变量。

回到顶部