0

I'm running Sublime Text 3 with the following Packages:

  • "CSSLint",
  • "HTML-CSS-JS Prettify",
  • "Javascript Beautify",
  • "JavaScript Completions",
  • "JavaScript Ultimate",
  • "JSLint",
  • "Package Control",
  • "Theme - Soda"

I have installed Node and JSON, which are common requisites for most packages. Whenever I start Sublime, I get the following error messages (as pop-up bubbles):

Error loading syntax file
"Packages/JavaScript/JavaScript.sublime-syntax": Unable to read
Packages/JavaScript/JavaScript.sublime-syntax

and

Error loading syntax file "Packages/JavaScript/JSON.sublime-syntax":
Unable to read Packages/JavaScript/JSON.sublime-syntax

After these two error messages pop up and I hit "ok" for both, in my Preferences.sublime-settings file, "JavaScript" is added to ignored packages like so:

"ignored_packages":
[
    "JavaScript"
],

I've tried commenting out "JavaScript" from ignored packages and saving it, as well as deleting it completely from "ignored_packages" and saving it, but then every time I start Sublime up, it puts it back.

The problem that this is causing is that it causes JavaScript syntax highlighting to turn off completely, which is rather annoying.

Node, JSON, Sublime, and the rest of the packages are installed to the default, and I'm having this problem on two separate devices.

Does anyone know what might be causing this error? How could I fix it? If you need any more information, please comment and let me know, and I'll try and get it. I can also do screenshots if needed.

Thanks!

3

It's all JavaScript Ultimate's fault (see link for the actual code). Upon loading, this language definition package will automatically disable the default JavaScript package, including both the JavaScript and JSON syntaxes, just because it thinks its version is better. There is no setting to disable this "feature", and even if you remove "JavaScript" from the "ignored_packages" list, it will just be added back the next time you restart Sublime. I would definitely suggest opening strongly-worded issues about this annoyance, because it really is inexcusable. I've written my own replacement syntax for Python, and while I think it's great, I would never disable the built-in version.

So how do you fix it? First, you'll need to install PackageResourceViewer, an excellent little utility for working with Sublime Text 3's zipped .sublime-package files. Select PackageResourceViewer: Open Resource from the Command Palette, navigate down to JavaScript Ultimate, click on it, then navigate down to install.py and click on it. (You can then hit Esc to close the menu.) Since there's nothing really necessary in there, you can just delete the entire contents of the file, then save the empty file. It will now override the file in the .sublime-package archive.

  • what the hell has python to do with this ? nothing happens when I install PackageResourceViewer, nothing in command palette either..f@#k sake – user3455897 May 17 '18 at 6:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.