Grunt is not working through batch file - batch-processing

When i run grunt command through manually opening the cmd and write the command then it works nicely, but the same command is not working through batch file.It shows grunt is not recognized as internal or external command.
please help me to fix this.
Thanks in advance.

Related

I'm trying to use the NPM javascript build tool Jake. I cannot run it from the command line

I installed Jake this way:
npm install -g jake
But now what? All the examples of people using Jake execute it from the command line like so:
jake
but when I do that I see this:
'jake' is not recognized as an internal or external command,
operable program or batch file.
Yes, I rebooted.
Yes, npm itself works.
If there's anything to put in the Path system environment variable, I don't know what it is.
I tried adding C:\Users[me]\AppData\Roaming\npm\node_modules to the Path system environment variable and that didn't work.
I Googled this problem without success and was hoping maybe there is some secret that someone knows that I do not.

'astro' is not recognized as an internal or external command, operable program or batch file

I was able to run my website before but now it won't let me. I tried to download old code from my branch history and it's not still working. Not sure what I did. I tried looking up ways to resolve but couldn't find anything. Does anyone have any ideas?
I ran npm install again and it solved the problem.

.sh script does not run on SSH instance on Google Cloud

When I try to run a .sh script on an SSH instance on Google cloud, I get this error:
bash: abc.sh command not found
This runs fine when I run it on the Google shell. I tried setting 'PermitUserEnvironment yes' in the sshd_config file but this did not change the output.
From my reading on similar issues, it seems as though I should be setting some other PATH variables but I'm not sure which ones these are.
The issue was solved running the command with the path.
/path/to/file.sh
You were not able to run the command because bash was trying to locate that command inside the location specified by PATH enviroment variable since you were not specifying the path.
Future people reading could find as well useful information here regarding possible causes.

How to create a .exe file for running command prompt commands

I wish to put the following steps in a .exe file so that manual intervention is avoided and everything is automated. All the user needs to do is double click this .exe file.
Following are the steps which I wish to automate.
Open command prompt.
Go to desired folder location Eg. cd Desktop\Automation\
Run the command ruby xyz.rb
Thanks!
Abhishek

running yiic from commandline fails after necessairy steps have been taken

I'm trying to install a Yii application with the latest framework to date on wampserver2.2.
I edited the .bat file to match the directory of my php /bin folder and added this as a value to the path variable.
However I seem to be unable to run yiic from the commandline. Im trying this on a windows 7 professional OS but to no avail. If i fire up yiic.php it opens the file in a notepad window. If I try to run the .bat file, the cmdline returns that it can not open the input file c:\wamp\framework\yiic
What should I do to make yiic run from the commandline? I think I completed all the necessairy steps but could be easily overlooking something.
If someone could come up with an answer that would be great.
Two things:
Make sure you are running yiic.bat, and not just yiic (which is the Linux shell script). There are two files in the directory, and your error (can not open the input file c:\wamp\framework\yiic) looks like you are using just yiic, the Bash script.
As #schmunk mentioned in the comment on the question, you can just call yiic.php directly with the PHP CLI. That is what the yiic.bat script is doing for you. :)
C:\wamp\framework> php yiic.php webapp C:\wamp\htdocs\myproject
I answered a similar question here that covers the same stuff:
https://stackoverflow.com/a/3728454/164439