1

Hi I'm trying to create a new Javascript Build system in Sublime Text 3 using Node. This is the code I have in my build file:

{
    "cmd": ["/c/Program Files/nodejs/node","$file"],
    "selector": "source.js"
}

I'm trying to print something in the console, but when I run the program I get this error message:

[WinError 2] The system cannot find the file specified
[cmd: ['/c/Program Files/nodejs/node', 'C:\\Users\\Isaiah\\AppData\\Roaming\\Sublime Text 3\\Packages\\User\\node.sublime-build']]
[dir: C:\Users\Isaiah\AppData\Roaming\Sublime Text 3\Packages\User]
[path: C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Git\cmd;C:\Program Files\Boot2Docker for Windows;C:\Users\Isaiah\AppData\Local\atom\bin]
[Finished]

1 Answer 1

2

You can use this format for the PATH:

{
    "cmd": ["C:\\Users\\username\\node.exe","$file"],
    "selector": "source.js"
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.