V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
orangutan92
V2EX  ›  macOS

VSCode for Mac 如何终止 yarn serve 启动项目?

  •  
  •   orangutan92 · May 25, 2023 · 1448 views
    This topic created in 1075 days ago, the information mentioned may be changed or developed.

    我用yarn serve命令启动一个 Vue 项目,我按了很多次Ctrl + C,发现不起作用,控制台还在一直跑,必须要点右键终止才可以。

    Windows 上没这个问题,Mac 上怎么解决呢,是快捷键的问题还是什么原因?

    5 replies    2023-05-25 16:08:49 +08:00
    zhaol
        1
    zhaol  
       May 25, 2023
    是不是你的快捷键被其他操作占用了,我这边没这个问题。
    crysislinux
        2
    crysislinux  
       May 25, 2023
    我 mac 也没有这个问题。你看看在 macos 的 terminal 里 ctrl c 有效没。用 tail -f 模拟一下。
    LEEiz
        3
    LEEiz  
       May 25, 2023
    重复一直按 ctrl 周围的建也按按 连续不停的按可能可以终止掉
    nicholasxuu
        4
    nicholasxuu  
       May 25, 2023
    `netstat -anv | grep <port>` 找到 pid
    然后 `kill -9 <pid>`

    根本原因不知道,好像是有些东西版本太老有 bug 的问题,最近好几年没遇到了。
    orangutan92
        5
    orangutan92  
    OP
       May 25, 2023
    @crysislinux #2 在 iterm2 里面和 vscode 的 zsh 都无法打断,但其他命令 ping xxx 都可以终止
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   791 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 22:07 · PVG 06:07 · LAX 15:07 · JFK 18:07
    ♥ Do have faith in what you're doing.