Cannot find runtime 'node' on PATH - Visual Studio Code and Node.js

后端 未结 18 2284
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-07 23:54

With a downloaded and installed version of Visual Studio Code 1.2.1, and a 64bit version of node.exe msi placed in my working directory (I am assuming that is correct), how

18条回答
  •  独厮守ぢ
    2020-12-08 00:43

    For me, the node binary is in PATH and I can run it from the terminal (iTerm or Terminal), and the Terminal apps are set to use zsh

    If you are on a Mac, with iTerm and Zsh, please use the following VSCode settings for Node to work.

    After this change, you can get rid of this line from your launch.json config file. (the debug settings in VSCode)

        "runtimeExecutable": "/usr/local/bin/node"
    

    If this doesn't work, make sure you choose the default shell as zsh. To do this,

    • Open the command palette using Cmd+Shift+P

    • Look for the Terminal: Select Default Shell command

    • Select zsh from the options

提交回复
热议问题