Closed getsetbro closed 11 years ago
Interestingly enough, I get about the same error on Ubuntu 64bit. Difference is that my error message says just "bower", not "bower.cmd"
The issue most likely lies in that the path that python from within ST has access to may not be the same that other parts of the system has access to. This obviously assumes you can add things via Bower through other means =)
In my case (Ubuntu 12.04) I had to add the exported paths to my .profile
file, and unfortunately I'm unsure how that would be done in Windows.
To check if that is the issue you are running into, show the python console and write in the following:
import os
os.environ['PATH']
One temporary solution might be to add a shortcut to the bower file (wherever it is) into one of the paths that it is recognizing.
Windows XP - same thing :\
bower.cmd could not be found in your $PATH. Install bower with npm install bower -g
Can either of you run "bower" in command line?
In my case, yes. I solved my issue when I finally found how to expose the $PATH to the GUI.
Can you please document them so I can figure out how to support windows better?
Sorry, I only do Ubuntu, but for Ubuntu it has to do with adding the path to find bower in the .profile
file.
which bower
to find where it is, and then add PATH=$PATH:<path to bower>
to ~/.profile
On windows (any version) bower.cmd resides in %APPDATA%\npm (the user global node package directory). In normal conditions the NodeJs installer is adding this path to "HKCU\Environment\PATH" registry variable, so no further user actions are required to run node package commands in the terminal later (or call bower.cmd from other apps).
When run on *NIX sublime-bower's cli.py is pushing additional hint paths into the environment, using the LOCAL_PATH variable (pushing ':/usr/local/bin:/usr/local/sbin:/usr/local/share/npm/bin'), but not (yet) on Windows, the variable is initialized empty, i'll address a patch that fixes that tomorrow.
@moonpyk, whatever you can do to help is appreciated. I'm not a windows user at all, so I'm totally in the dark :-1:
Again some issues ?
I reopened the issue so we can track through the patch that you said you'd send tomorrow
Yup maybe you closed the issue a bit fast :smile: Uh in fact the patch i was supposed to send tomorrow is the pull request I did today (it's 3AM here, but seems I have an insomnia)
@Den-dp @Melindrea @getsetbro - Can you all please update the plugin and retest? @moonpyk did a bunch of awesome work for Widnows support… I think we're about there now.
I just got bower through the package manager again. I have the same error when I try to get a library.
@moonpyk, any thoughts? @getsetbro, did you try restarting sublime editor and trying again?
@getsetbro could you open a cmd.exe, type "cd %APPDATA%\npm" then "dir" and paste the output here ?
03/24/2013 08:05 PM
bower is not installed. try again "npm install -g bower"
ok, but that is sort of the point of this error. That installing it with the package manager is not installing it on systems like mine.
This is really weird, my laptop is a 64b windows 8 and i have no problem. Which version of node and npm are you running ?
node --version v0.10.0
npm --version 1.2.14
It is working for me now that I installed Bower via CMD and with the package manager in sublime.
So everything works now ?
Is it supposed to install everything needed via the package manager? Or are you supposed to install it with both - npm and in sublime text?
Both, Sublime-Bower is just an interface to the system bower.
ok then, the problem was that I had only added Sublime-Bower and not both.
@benschwarz We should add a note in the README regarding that, people have to make suke that bower is working out of sublime text before trying to make it work inside sublime.
Thanks for covering it @moonpyk, I thought it was already pretty clearly listed under dependencies… perhaps I'll merge that into the install header, so it can't be missed.
Having error still on Windows 8.1 following instructions. bower.cmd could not be found path Read https://github.com/benschwarz/sublime-bower/ Something like that in messege
I added it to Sublime Text 2 on Win8 x64 via the Package Control. When try to add anything via Bower I get this error.
" bower.cmd could not be found in your $PATH. Install bower with
npm install bower -g
"