Sublime Forum

Trying to open a HTML file in chrome using sublime text

#1

Hi guys,
I would greatly appreciate some help. I am trying to open a HTML file in chrome using sublime text. I’ve followed the instructions and keep getting the error below.
I am using {
“cmd”: [“C://Program Files (x86)//Google//Chrome/Application//chrome.exe”, “$file”],
“selector”: “text.html”
}
I have tried using // and reversed slashes. Any suggestion?

[WinError 2] The system cannot find the file specified
[cmd: [‘PATH_TO_CHROME_OR_FIREFOX’, ‘C:\Users\Marta\Desktop\HTML files\Chrome.sublime-build’]]
[dir: C:\Users\Marta\Desktop\HTML files]
[path: C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;C:\Program Files (x86)\Skype\Phone;C:\WINDOWS\System32\OpenSSH;C:\Users\Marta\AppData\Local\Programs\Python\Python37-32\Scripts;C:\Users\Marta\AppData\Local\Programs\Python\Python37-32;C:\Users\Marta\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\PyCharm 2019.2.1\bin;;]
[Finished]

0 Likes

#2

cmd should be

"cmd": ["C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "$file"],

UPDATE: Wait… I tried the following works too. So there can be other reasons.

"cmd": ["C:/Program Files (x86)/Google/Chrome/Application/chrome.exe", "$file"],
0 Likes

#3

Hi Jack,
I have tried both. Now a commandwindow appearsand quickly disappears and Chrome…sublime-build downloads onto my computer but i can’t open it as it has no associated app on the computer :confused:

An i have this error message:
[WinError 2] The system cannot find the file specified
[cmd: [‘PATH_TO_CHROME_OR_FIREFOX’, ‘C:\Users\Marta\Downloads\Chrome (1).sublime-build’]]
[dir: C:\Users\Marta\Downloads]
[path: C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;C:\Program Files (x86)\Skype\Phone;C:\WINDOWS\System32\OpenSSH;C:\Users\Marta\AppData\Local\Programs\Python\Python37-32\Scripts;C:\Users\Marta\AppData\Local\Programs\Python\Python37-32;C:\Users\Marta\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\PyCharm 2019.2.1\bin;;]
[Finished]

0 Likes

#5

dumb question:

Are you sure C:\Program Files (x86)\Google\Chrome\Application\chrome.exe or your PATH_TO_CHROME_OR_FIREFOX exists?

It looks like the only way I can reproduce the same error msg is by providing a nonexistent executable.

0 Likes