Npm reported an error when installing gulp. gulp installation was unsuccessful.

  node.js, question
MENG@MISH MINGW64 /d/Program Files/nodejs
 $ npm -g install lodash
 D:\Program Files\nodejs
 └── lodash@4.0.0
 
 
 MENG@MISH MINGW64 /d/Program Files/nodejs
 $ npm -g install gulp
 npm WARN deprecated lodash@1.0.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
 npm ERR!  Windows_NT 6.3.9600
 npm ERR!  argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "gulp"
 npm ERR!  node v5.1.1
 npm ERR!  npm  v3.3.12
 npm ERR!  path D:\Program Files\nodejs\node_modules\gulp
 npm ERR!  code EISGIT
 
 npm ERR!  git Appears to be a git repo or submodule.
 npm ERR!  git     D:\Program Files\nodejs\node_modules\gulp
 npm ERR!  git Refusing to remove it. Update manually,
 npm ERR!  git or move it out of the way first.
 
 npm ERR!  Please include the following file with any support request:
 npm ERR!  D:\Program Files\nodejs\npm-debug.log
 
 MENG@MISH MINGW64 /d/Program Files/nodejs
 $ npm -g root
 D:\Program Files\nodejs\node_modules
 
 MENG@MISH MINGW64 /d/Program Files/nodejs
 $ npm root
 
 D:\Program Files\nodejs\node_modules
 
 //Sometimes it is shown that gulp@3.9.0 is installed but still cannot be used
 MENG@MISH MINGW64 /d/Program Files/nodejs
 $ gulp -v
 bash: gulp: command not found

What causes it?

$ npm config set prefix // is this setting relevant?

I uninstalled again and installed lodash again, or the same. …

Happiness comes too suddenly, I don’t know how.

Download the updatenode.js

Npm replaced withNpm Mirror of Taobao

$cnpm install gulp// cannot bring -g, and then it succeeded.