How to fix this error. When i use command “yo meanjs”, but not show as in video. It’s:
undefined
You’re using the official MEAN.JS generator.
What mean,js version would you like to generate? i choose 0.4.0
In which filder would you like the project to be generated? mean
Cloning the MEAN repo…
Then it appear error:
Command failed: C:\Windows\system32\cmd.exe /s /c “rm ./mean/package.json”
‘rm’ is not recognized as an internal and external command, operable program or batch file.
you should install git on windown 7 and select folder you want . click -> right mouse -> Git Bash
After type command : "yo meanjs" and everything will good
The tpt2213's answer works, but it can't select menu items of "yo meanjs" with arrow keys.
You need to have cmd.exe with PATH setting, which includes the git command and Unix commands like the rm.
If you install git on window 7 in the folder, "C:\Program Files\Git", set PATH before you run "yo meanjs".
set PATH=C:\Program Files\Git\usr\bin;C:\Program Files\Git\bin;%PATH%
yo meanjs
I'm trying to do a custom build for Sublime 3 so that it opens chromium and the .html document that I'm working on. I'm able to launch Chromium with this:
"shell_cmd": "/usr/bin/chromium-browser"
How do I also open the file I'm working on?
You should use the $file build system variable to refer to the full path of the current file:
"shell_cmd": "/usr/bin/chromium-browser $file"
On linux:
{
"cmd": ["google-chrome", "$file"]
}
Save your file as ViewInChrome.sublime-build (path is selected as ~/.config/sublime-text-3/Packages/User by default, if not select this path)
I'm looking for a solution to be able to right-click on any folder in the side bar, of Sublime Text 2 on Windows, and select "Open with Git Bash" so that Git Bash opens with that folder, ready for my git commands.
I've tried the Open With functionality with the Side Bar Enhancements plugin, but no luck.
Oh, and I've tried the "Git" plugin for ST2. It's not what I need.
This worked for me on Windows 7
Create the following files under Packages/User
git_bash.py
import sublime
import sublime_plugin
class GitBashCommand(sublime_plugin.WindowCommand):
def run(self, **args):
dir = args["dirs"][0]
self.window.run_command("exec", {"cmd": ["start", "sh", "--login", "-i"], "shell": True, "working_dir": dir})
self.window.run_command("hide_panel", {"panel": "output.exec"})
def is_visible(self, **args):
return len(args["dirs"]) > 0
Side Bar.sublime-menu
[
{ "caption": "Git bash...", "command": "git_bash", "args": { "dirs": []} }
]
Make sure to add you Git Bash bin folder avaiable in the Windows PATH, on windows 8 its per default ;C:\Program Files (x86)\Git\bin\
http://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/
Create a file with no extension name and put this:
#!/bin/sh
"C:\Program Files\Sublime Text 2\sublime_text.exe" $1 &
Then, open your Git folder > bin, paste it there.
Now, you can do
subl sample_directory
I need to make a build file for BibTeX files.
I have the following:
{
"cmd": ["bibtex", "*.aux"],
"selector": "text.bibtex"
}
When I run bibtex *.aux from terminal, it works fine. However, sublime keeps telling me:
I couldn't open file name `*.aux'
[Finished in 0.1s with exit code 1]
The answer is: make a custom script!
eg: subl /home/user/buildBibtex.sh consisting of:
#!/bin/sh
bibtex *.aux
run chmod +x /home/user/buildBibtex.sh
and the build file will look like this:
{
"cmd": ["/home/user/buildBibtex.sh"],
"selector": "text.bibtex"
}
Getting this error in sublime text, wondering what to do about it. Is there a way to completely uninstall any related files to ST2? I tried uninstalling it and re-installing it, but this error still persists. I imagine there are some temp files, or cached files that I need to remove, is there a way to clear those out?
Unable to run package setup:
Traceback (most recent call last):
File "/usr/lib/sublime-text-2/PackageSetup.py", line 165, in upgrade
upgradePackage(pkg, pristinedir, datadir, backupdir)
File "/usr/lib/sublime-text-2/PackageSetup.py", line 158, in upgradePackage
os.path.join(backupdir, base), inhibitOverwrite)
File "/usr/lib/sublime-text-2/PackageSetup.py", line 90, in upgradeArchive
writeFile(fname, newar.read(f))
File ".\zipfile.py", line 834, in read
File ".\zipfile.py", line 857, in open
File ".\zipfile.py", line 824, in getinfo
KeyError: "There is no item named u'nathos-sass-textmate-bundle-0e46064/Snippets/expression(\\u2026).tmSnippet' in the archive"
execute
sudo sublime
for the first time
On Ubuntu:
I tried Achu solution but it didn't work. My Sublime Text 2 started working after I changed the files owner to my user. You have to open Terminal (ctrl+alt+t) and type:
sudo chown -R [your user name here] /home/[your user name here]/.config/sublime-text-2/
So, for example, if your user is "john" you have to type:
sudo chown -R john /home/john/.config/sublime-text-2/
Hope this helps.
Similar to Victor's answer, but more specific, I deleted the single file C:\Users\(Username)\AppData\Roaming\Sublime Text 2\ Installed Packages\Sass.sublime-package and then Sublime Text 2 started up fine.
On Ubuntu:-
I found this is a permission issue. Just change the permission to 777
sudo chmod 777 -R /home/user/.config/sublime-text-2/Packages/[package name]
The last line says:
KeyError: "There is no item named u'nathos-sass-textmate-bundle-0e46064/Snippets/expression(\\u2026).tmSnippet' in the archive"
So search for that object recursively in files in the sublime text user data directory:
cd ~/Library/Application\ Support/Sublime\ Text\ 2/
grep -r nathos-sass-textmate-bundle-d6d079e *
#Result# Binary file Installed Packages/Sass.sublime-package matches
Then delete the offending file:
rm -rf Installed\ Packages/Sass.sublime-package
I deleted some erronous packages which solved my problem. Steps to do it here: http://untroubler.com/questions/8-sublime-text-2-and-unable-to-run-package-setup
Update after comment below:
This is due to a corrupt install of a package. On OSX, goto:
/Users/YOU_USER_NAME/Library/Application Support/Sublime Text 2/Installed Packages/.
Remove the package you tried to install and it should work again.
I managed to find all related files to this bundle and deleted them manually. I've noticed that if I miss a package from somewhere ST2 recreates some folders based on packages related to it, so it's not enough to delete some folders, you have to really find all related data and delete it.
sudo sublime-text
This works for me.
Simply reverting Sublime Text to a freshly installed state resolved this issue.
Sublime Text 2 can be reverted to a freshly installed state by removing your data folder. Depending on your operating system, this folder is located:
OS X: ~/Library/Application Support/Sublime Text 2
Windows: %APPDATA%\Sublime Text 2
Linux: ~/.config/sublime-text-2
To revert to a frestly installed state on Ubuntu 13.10, you can:
Exit Sublime Text 2
Delete (or move) the data folder, so running sudo rm -rf
~/.config/sublime-text-2
Start Sublime Text 2
Hope this helps.
There's already an answer related to permissions for Linux, but I found the issue was related to permissions for a Windows install. I placed the install for portable files into "Program Files/SublimeText2" - apparently when I run ST2 it needs additional permissions which it wasn't getting.
So I installed ST2 portable to a folder in a user directory (e.g. A folder my user created and maintains - C:\dev\SublimeText2) and everything works fine now.