Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text build: 'node' is not recognized as an internal or external command

Using Windows XP, I've installed the CoffeeScript plugin on SublimeText2 via Package Control. When I try to build test.coffee I get:

'node' is not recognized as an internal or external command, operable program or batch file.

But entering "node -v" in a cmd console returns "v0.10.0" because my PATH variable contains "C:\Program Files\nodejs\".

I've found threads about people getting stuck in the build stage with SublimeText, but none of those matched my problem. Anyway, here is my CoffeeScript.sublime-build, as it often plays a central role:

{
    "cmd": ["cake", "sbuild"]
    ,"windows":
        {
            "cmd": ["cake.cmd", "sbuild"]
        }
    ,"selector": "source.coffee"
    ,"working_dir": "$project_path"
    ,"path": "C:\\Documents and Settings\\User\\Application Data\\npm"
    ,"variants":
        [
            {
                "name": "Run",
                "cmd": ["coffee", "$file"]
            }
        ]
}  


Update: I got until there thanks to Sublime Text build: cannot find the file specified, whose answer is the same as my other source, this blog and its comments. But I am still stuck.

like image 207
BobbyVolley Avatar asked Mar 18 '13 15:03

BobbyVolley


People also ask

How do you fix node is not recognized as an internal or external command operable program or batch file in VS code?

You must click the Kill Terminal button (highlighted) and then restart VS Code and node will start working again.

Is not recognized as an internal command node?

Two of the main reasons due to which you can encounter the above-mentioned error are: Node. js is not installed on your system. Environment variables are incorrectly set.


1 Answers

Actually this similar problem and solution work, you just need to close and reopen Sublime Text for it to take effect. Because editing CoffeeScript.sublime-build and building iteratively will mess with Sublime's "path" variable.
Thanks to those who gave ideas, sorry for the trivial problem.

like image 162
BobbyVolley Avatar answered Oct 13 '22 11:10

BobbyVolley