You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用WebStorm打开终端遇java.io.IOException: Couldn't create PTY错误求助

Fixing "java.io.IOException: Couldn't create PTY" in WebStorm Terminal

Hey there, sorry to hear you're stuck with this terminal error in WebStorm—total buzzkill when you're deep into your Angular project! Let's break down some tried-and-true fixes that usually resolve this PTY creation issue:

  • Verify WebStorm's system permissions
    Creating a PTY (pseudo-terminal) requires proper system access. On macOS, head to System Preferences > Security & Privacy > Privacy > Full Disk Access and make sure WebStorm is added to the list. On Windows, right-click WebStorm and select Run as administrator to rule out permission blocks.

  • Restart everything (yes, really)
    Temporary process conflicts or stuck system resources often cause this. First close WebStorm completely, then restart your computer. This clears out any lingering locks that might be preventing PTY creation.

  • Switch your terminal shell
    WebStorm might be having issues with your default shell. Go to Settings > Tools > Terminal and change the Shell path:

    • For macOS/Linux: Try bash instead of your default (like zsh) temporarily, or /bin/sh
    • For Windows: Swap between cmd.exe and powershell.exe to see if one works
  • Update WebStorm to the latest version
    Older IDE builds sometimes have known bugs with terminal initialization. Go to Help > Check for Updates and install any available stable updates. This also helps ensure compatibility with your Angular project dependencies.

  • Check if your system terminal works
    Open your system's native terminal (Terminal.app on macOS, CMD/PowerShell on Windows) and run commands like ng version or node -v. If the system terminal has issues too, the problem is with your OS's terminal configuration—not WebStorm. Fix that first (e.g., resetting shell profiles) before troubleshooting the IDE.

  • Reset WebStorm's terminal settings
    Corrupted terminal config files can cause this. In Settings > Tools > Terminal, click the Restore Defaults button at the bottom right, then restart WebStorm.

From your error screenshots, this looks like a standard PTY initialization failure tied to either permission restrictions or conflicting terminal configurations. Start with the simpler fixes (restart, permissions) first—they often do the trick!

内容的提问来源于stack exchange,提问作者VonNet

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 10:00:47