如題,博主一開始的批處理命令是這樣的:
cd node_modules
cd heapdump
node-gyp rebuild
cd ..
cd v8-profiler-node8
node-pre-gyp rebuild
cd ..
cd utf-8-validate
node-gyp rebuild
cd ..
cd bufferutil
node-gyp rebuild
pause
執行結果:
?
從結果中可以看到,node-pre-gyp rebuild 命令執行完,就停止了,沒有繼續執行剩余的命令,查閱資料無果,最終在同事的幫助下,使用&&連接符,讓所有命令得以生效。
?
使用連接符&&的命令:
cd node_modules
cd heapdump
node-gyp rebuild && cd .. && cd v8-profiler-node8 && node-pre-gyp rebuild && cd.. && cd utf-8-validate && node-gyp rebuild && cd.. && cd bufferutil && node-gyp rebuild && pause
執行結果:
?
可以看到,批處理成功執行到了最后一條pasue命令。
?