重新安装Windows 10后,启动gulp watch
时出现以下错误:
Error: listen EADDRINUSE :::3000 at Object._errnoException (util.js:992:11) ... at module.exports.plugin (D:\xampp\htdocs\blagnac\wp-content\themes\blagnac\gulp\node_modules\browser-sync\dist\server\index.js:27:25)
我尝试了npm install browser-sync --save-dev
,我尝试了npm install
,我尝试了npm rebuild
。什么都行不通。有什么想法吗?
答案 0 :(得分:1)
错误告诉您端口3000中已经有一个进程在运行。
选项1(首选)
为了在端口3000上运行gulp watch,您需要终止在端口3000上运行的现有进程。 SO answer中给出了终止进程的步骤。
选项2
一种替代方法是将gulp运行的端口从3000更改为其他名称,例如3001。