如题,博主一开始的批处理命令是这样的:

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命令。

 

相关文章:

  • 2021-10-11
  • 2021-07-02
  • 2022-12-23
  • 2021-05-17
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-08
  • 2022-12-23
  • 2021-12-04
  • 2022-03-05
  • 2022-02-17
相关资源
相似解决方案