简体   繁体   中英

Can't get Sublime Javascript Build to work

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]

You can use this format for the PATH:

{
    "cmd": ["C:\\Users\\username\\node.exe","$file"],
    "selector": "source.js"
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM