Bower Init Register requires an interactive shell error - shell

this is what I get when I use bower init
what could be the problem??

The problem is with the terminal/console you're using to.
I ran into this same problem other day, I was using Git bash as my terminal, and trying to run this command with Node.js command prompt worked normally.
Try to use another terminal, like cmder (I really recommend this to Windows users), Node.js command prompt or even Windows cmd itself. Hope to have helped you. Best wishes!

The solution is to install GIT bash and avoid
using MinTTY and follow the documentation. Here is the solution:
Uninstall existing GIT bash Reinstall GIT bash Set up during
installation:
Select Use Git from the Windows Command Prompt
Select Checkout Windows-style, commit Unix-style line endings
Select Use Windows' default console window

Okay this works for sure -
Go to https://cygwin.com/install.html and download either the
32 or 64 bit version of Cygwin.
Run the install and install it onto one of your drives.
Run the Cygwin.bat and you will get the same command line
interface.
When you run bower init, it will work just fine. The Mintty that
comes with GIT is broken for somethings. Use the shell that comes
with Cygwin and you will be fine.
It works for me no problem. I used the 64 bit version on a Window 8 64bit OS. Good Luck!

You're most likely running C:\Program Files\Git\git-bash.exe and can instead run C:\Program Files\Git\bin\bash.exe to eliminate the issue. This avoids having to install another yet another terminal.

Related

How to install git on Windows 10 without Git Bash or GUI?

I am trying to install Git on Windows 10, but without Git Bash or GUI. I want to use Git in PowerShell and I would like not to bloat my PC. I know the install size is small, but that's not the issue.
I've tried going through the installer from git-SMC/Git for Windows a couple times, but it appears I can not opt out of GUI and Bash. Any idea how I can do this? Perhaps Chocolatey is of any use?
Thanks in advance!
You can use MinGit
MinGit is provided on the Git for Windows repository
https://github.com/git-for-windows/git/releases
It does not come preinstalled with Git Bash, GitK or Vi etc.
The github repo publishes portable and minimum versions of the binary releases which don't require installation. You could prune out the parts you don't want if you need to cut it down further.
https://github.com/git-for-windows/git/releases
Or instalation Using Chocolatey, if that will be ok for you
https://www.jamessturtevant.com/posts/5-Ways-to-install-git-on-Windows/#using-chocolatey
I started with Git and then removed everything except the following dirs:
\mingw64\libexec\git-core
\ssl
Rename git-core to cmd and move it up 2 levels and you don't even have to edit your .gitconfig.
Works like a charm for me.

cant use sudo, apt ,npm, etc in my vscode terminal even though I have Ubuntu bash installed on Windows 10

VSCode Version: 1.22
OS Version: Windows 10
explanation of issue:
I Entered something Basic Like sudo apt update or npm update inside my vscode integrated terminal and I get This Error Message:
bash: sudo: command not found
bash: npm: command not found
I Have the Ubuntu Bash installed on my windows 10 OS but inside my vscode terminal these commands dont work (even though they work inside the default terminal on my desktop).
How Can I fix this problem so I can strictly use the terminal in vscode and not a separate terminal, in order to save space on my screens?
This is explained in the documentation for VS Code (which has various options), but to avoid this being a link-only answer:
Set the "terminal.integrated.shell.windows" VS Code configuration variable to "C:\\Windows\\System32\\bash.exe" and you should be good to go.
For convenience, there's also a Select Default Shell command in the command palette which sets this for you.

How do I install Git for Windows software to a specific directory?

I have just downloaded the latest Git for Windows installer, v2.4. It appears to want to install to the standard Windows "Program files" (with-spaces-in-name) directory.
Since I have all my development code in a folder called (simply) "/bin" -- I want to see if there's a command line option or parameter to change the install directory.
In my case, these days I use a environment variable such as GIT_HOME for important software like git; so it would be useful if there was a way to apply that to things like git commands, etc once I have the program installed.
possibly related:
How do I change the directory in Git Bash with Git for Windows?
I also came across a few questions asking: "whereis git". That's answered above, however I take that as an indicator that others may want git somewhere else too.
To start the installer with a different installation path you can open a CMD terminal in the same directory as the installer executable and pass in an option parameter of /DIR="x:\dirname"
For instance, if you have version 2.17.0 for Windows 64bit and you want to install git to D:\git, you would run:
Git-2.17.0-64-bit.exe /DIR="D:\git"
The installer will launch as usual and you need to walk through the other options, but the install location will be the path specified.
Since I just ran into this problem because my SSD is filling up, I figured I'd share the solution I came to on Windows 11 with Git v. 2.37.2.
The best way I could figure was to uninstall Git, then in CMD Prompt use the suggested command from the Git website with an appended --location/ -l flag:
winget install --id Git.Git -e --source winget --location [drive:/directory]
where [drive:/directory] is your target for the install. Had no issues and verified it worked with a project.

Bower can only see git path on gitBash, not in cmd (windows)

Apologies if this is wrong format of question: my issue is resolved in another post but I'm hoping for help on understanding the why.
I've been trying to run
bower install
through the command line as administrator on Windows 8, and I get the error
bower ENOGIT git is not installed or not in the PATH
However, other "git..." commands in the same window work fine (Git's /bin/ and /cmd/ have been added manually to the system-level path). As per the helpful suggestion at https://stackoverflow.com/a/21444065/4477927 , running bower install at the same location through git bash - rather than windows cmd - works fine.
So although my problem is solved I'd like to improve my understanding of the tools by knowing why the git command works when typed manually, and can be invoked by bower through git bash, but cant be invoked by bower through cmd?

How do I install a shell script?

I want to use the shell script git-ftp on OSX but I have absolutely no experience using shell scripts. (I use git from the command line a bit and that's all)
What do I do with the files downloaded from that site?
No need to install
Open terminal application.
Drag git-ftp on terminal.
Run

Resources