npm ERR! EEXIST: file already exists, symlink '../gulp/bin/gulp.js' -> '/.jenkins/workspace/eshop/build/node_modules/.bin/gulp' File exists: ../gulp/bin/gulp.js Move it away, and try again.
npm ERR! Please include the following file with any support request: npm ERR! /.jenkins/workspace/eshop/build/npm-debug.log [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19.399 s [INFO] Finished at: 2016-12-15T06:06:26+00:00 [INFO] Final Memory: 8M/63M [INFO] -----------------------------------------------------------------------
一开始以为是建symlink的问题,考虑了可能权限或者symlink已存在的情况。但是用全新的一个虚机去跑npm install还是失败,错误有原因也是一样。本着死马当活马医的思路,加了一个-–no-bin-link参数,问题奇迹的解决了。查看官网的一段解释The --no-bin-links argument will prevent npm from creating symlinks for any binaries the package might contain.貌似也是在虚机才会出现这种情况。