JSLint with Sublime text 2 - The system cannot find the file specified - sublimetext2

I have installed JSlint properly but when I tried to run it I got below error:
[Error 2] The system cannot find the file specified
[cmd: [u'/usr/local/bin/node', u'/usr/local/bin/jslint', u'--sloppy', u'--indent', u'2', u'--node', u'--nomen', u'--vars', u'--plusplus', u'--stupid', u'']]
[dir: C:\Users\agrawal_d\AppData\Roaming\Sublime Text 2\Packages]
[path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;c:\Python27;C:\Program Files\nodejs\;C:\Users\agrawal_d\AppData\Roaming\npm]
[Finished]
Not understanding why it's showing this, can anyone please give me the solution

I got this problem as well and I hacked the file JSLint.sublime-build under installed JSLint package directory by replacing /usr/local/bin/node by the path to my node and it works.
Seems you're installing sublime text under windows platform. maybe you need to find the path to your node installation (e.g., C:\Program Files\nodejs\bin\node) and make sure the JSLint package can find it.

jslint most likely must be separately installed on your computer using Node and NPM package manager
Please follow the plug-in installation instructions on the plug-in README.
Here is a guide with some pictures
http://opensourcehacker.com/2012/04/12/jslint-integration-for-sublime-text-2/

It seems weird but in my case the solution is different. I was getting following error:
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'c:\\users\\arvind~1\\appdata\\local\\temp\\SublimeLinter3-arvind\\app.js'
I checked the c:\\users\\arvind~1\\appdata\\local\\temp\\ folder and found that it had not SublimeLinter3-arvind folder. I created this folder manually and JSHint it started working..

Related

Trouble installing PHP Code Sniffer

I'm attempting to install PHP Code Sniffer for PhpStorm, but have been unable to get it to work. I've been following the steps here: https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm
I added PHP Code Sniffer as a Composer dependency, and it now appears in the project directory. I then went to the code sniffer settings page, where I entered the path to the PHPCS.bat file. When I click Validate, I get an error message saying "Can not run PHP Code Sniffer".
Have I missed a step or is there a log somewhere with more information on what is not working?
I solved the same problem by editing the phpcs.bat file and replacing the paths:
PHPBIN=#php_bin#
with
PHPBIN=path\to\php.exe
and
"%PHPBIN%" "#bin_dir#\phpcs" %*
with
"%PHPBIN%" "path\to\phpcs" %*
I had the same issue, I solve it adding the php path to the PATH environment variables on windows. Because when it runs the scripts needs to run php and if it not present on the global path of windows will fail.

Fatal Error when accessing /index.php/Special:Specialpages MediaWiki page

I recently upgraded our MediaWiki installation to version 1.24.2
Now when I access the Special pages at http://www.myserver.com/index.php/Special:Specialpages I get this error:
Warning: require(/www/local/path/to/web_directory/public_html/includes/specials/SpecialAllPages.php) [function.require]: failed to open stream: No such file or directory in /www/local/path/to/web_directory/public_html/includes/AutoLoader.php on line 1282
Fatal error: require() [function.require]: Failed opening required '/www/local/path/to/web_directory/public_html/includes/specials/SpecialAllPages.php' (include_path='.:/usr/local/share/pear') in /www/local/path/to/web_directory/public_html/includes/AutoLoader.php on line 1282
Can someone please point me at the right direction to solve this problem?
I have already searched the entire interweb for an answer...
PHP version: 5.3.10
MySQL version: 5.5.31
Apache version: 2.2.22
It seems there was an error while upgrading/transferring the files to your server.
It seems you solved your problem by yourself, however: You shouldn't update mediawiki's files on top of another version. Instead, you should delete the old installation (keeping the files you need like LocalSettings.php, images/ and so on) and upload a new copy of the new version you want to use. See https://www.mediawiki.org/wiki/Manual:Upgrading for a detailed upgrading tutorial. Following these steps should avoid such problems the next time :)
I found out what the problem was.
I installed v 1.24.2 on top of version 1.21
By some reason the file SpecialAllPages.php was named SpecialAllpages.php with a small 'p'.
After renaming the file to SpecialAllPages.php the same error was triggered regarding the file SpecialAllMessages.php that was named SpecialAllmessages.php
After renaming that file also, everything works fine again.

How do I extend the $PATH that Sublime Text 2 uses?

I just installed Sublime-jshint (and the requisite node.js + jshint) but get this error when I try to invoke JSHint from within ST2:
[Errno 2] No such file or directory
[cmd: [u'jshint', u'PATH-TO-THE-JS-FILE-I-AM-LINTING', u'--reporter', u'/home/cmg/.config/sublime-text-2/Packages/JSHint/reporter.js']]
[dir: DIR-MY-JS-FILE-IS-IN]
[path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cmg/bin]
[Finished]
The final item in the given path is in the home dir of my user (cmg), so it's been customized somehow... but I don't recall how, so I don't know how to add the dir I need (~/node_modules/.bin).
I've added it to $PATH in my shell (via both .bashrc and .bash_profile) but ST2 doesn't pick it up.
(I'm on Ubuntu 14.04. All the usable stuff I've found via Google on this subject has been either OS X specific or related to ST's build system).
Basically, the exec command, which the jshint package uses internally, allows you to set/extend the PATH of the spawned subprocess. (docs)
The package actually uses this path argument on OSX, but has it hardcoded (I am partly guilty of that as I rewrote the command because it was just horrible before). It should allow for a setting to specify the path to your jshint executable, so I suggest you create an issue for that.
I don't know why ST dosn't pick up your PATH from somewhere else since I have very little experience with that.
Open /etc/profile in Sublime (using sudo) and add the following line at the very bottom:
export PATH=/home/cmg/node_modules/.bin:$PATH
and save the file. Restart completely, and your PATH should be updated.

Configure Sublime Text 3 GIT Path

I keep getting an "Executable '['git']' was not found in PATH. Current PATH" error message when trying GIT STATUS in Sublime Text 3. I have the SublimeGit plugin installed.
I have the following in my Package Settings > Settings - User
"git_executables": {
"git": ["/usr/local/bin/git"],
"git_flow": ["/usr/local/bin/git", "flow"],
"legit": ["legit"]
}
I have read https://docs.sublimegit.net/quickstart.html, but it does not go through windows paths.
Any help would be appreciated.
That error message can happen because of operations on a missing or moved file:
See issue 212 (for ST2, but possibly relevant for ST3).
Ok, I think why this bug happened.
There was a file that was moved to another location form outside ST2, and Git plugin failed to do something to the file because it no longer existed, but that situation was interpreted as missing git command.
Another workaround mentions:
Installing python via homebrew and restarting ST2 fixed this problem for me:
brew install python
Also, by David Gee -- davidagee :
On OS X Mountain Lion, the only way I was able to fix this, after trying everything in this thread, and additional mucking around with path settings, was to open "/Users/[me]/Library/Application Support/Sublime Text 2/Packages/Git/Git.sublime-settings" and to change git_command to "/usr/local/git/bin/git".
Adding a git_command setting to user prefs doesn't work.
The plugin seems to ignore the value when set in Preferences.sublime-settings.

sublime text 2 dart build error

I have configured sublime text 2 according to this video from Dart site. I have added this "dartsdk_path": "/home/green/dart/dart-sdk", to the Preference -> Setting-user. The syntax highlighting and and line indention works perfectly. But when i try to build i have the following error
[Errno 2] No such file or directory
[cmd: [u'dart2js', u'--minify', u'-o/home/green/Desktop/darttut/untitled.dart.js', u'/home/green/Desktop/darttut/untitled.dart']]
[dir: /var/www]
[path: /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/green/bin]
[Finished]
Did I miss something? or did i have done something wrong? I am using Ubuntu 13.04 x64 os.
Try modifying your Dart build file (~/.config/sublime-text-2/Packages/Dart/Dart.sublime-build) to include the full path to the dart2js command - something along the lines of:
"cmd": ["/full/path/to/dart2js", "--minify", "-o$file.js", "$file"],
You will also want to either add the path to dart2js to your $PATH environment variable, or, better yet, make a link to it in /usr/local/bin:
sudo ln -s /full/path/to/dart2js /usr/local/bin/dart2js