TigerTatoo

119 经验值

问题解决了。去github看了下,以前也有人出过和我相同的问题。是win10权限问题。需要使用管理员权限启动vagrant虚拟机才行。而且全局的gulp和本地gulp版本必须一致。

vagrant@homestead:~/Code/laravel$ npm install --no-bin-links
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^3.0.0.
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^3.0.0.
npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--no-bin-links"
npm ERR! node v5.0.0
npm ERR! npm  v3.3.6

npm ERR! Maximum call stack size exceeded
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--no-bin-links"
npm ERR! node v5.0.0
npm ERR! npm  v3.3.6
npm ERR! path npm-debug.log.270b9c503c081148b4c0806a1b22ef64
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rename

npm ERR! ETXTBSY: text file is busy, rename 'npm-debug.log.270b9c503c081148b4c0806a1b22ef64' -> 'npm-debug.log'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/vagrant/Code/laravel/npm-debug.log

换报这样的错误了。 :(

直接npm install安装报了这些错误:

npm WARN install Couldn't install optional dependency: Unsupported
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^3.0.0.

npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "gulp"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! path ../mkdirp/bin/cmd.js
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink

npm ERR! EPROTO: protocol error, symlink '../mkdirp/bin/cmd.js' -> '/home/vagrant/Code/laravel/node_modules/.bin/mkdirp'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! 
npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "gulp"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! path npm-debug.log.546f0d0cc6d56d878a26aa631313f236
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rename

怎么回事?我用的是homestead最新的版本(3.0.3)做虚拟机。
我用的VirtualBox 5.0,vagrant 1.7.4,系统是win10.