git bash安装gulp报错,Error: Cannot find module
使用git bash 安装gulp时,出现错误,运行gulp -v
,出现如下错误:
SNSD@SNSD MINGW64 ~
$ npm install -g gulp
npm WARN deprecated lodash.isarray@4.0.0: This package is deprecated. Use Array.isArray.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
C:\Users\SNSD\AppData\Roaming\npm\gulp -> C:\Users\SNSD\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js
C:\Users\SNSD\AppData\Roaming\npm
`-- gulp@3.9.1
SNSD@SNSD MINGW64 ~
$ gulp -v
module.js:457
throw err;
^
Error: Cannot find module 'C:\Program Files\Git\node_modules\gulp\bin\gulp.js'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.runMain (module.js:590:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是git?这是node.js的包管理库npm,一些插件需要更新后,再安装gulp
你试用 NODE 自己的 node command 终端进行安装
用 git bash 可能环境不一样
今天我把node_modules文件夹复制到Git安装目录下之后,就正常了。但是我以前没有这样操作过,也可以运行的啊。这是什么情况啊?