I work with laravel 5 , when i type in windows cmd this command "touch storage\database.sqlite" this error message rise 'touch' is not recognized as an internal or external command, operable program or batch file. any hint to solve it ?
I work with laravel 5 , when i type in windows cmd this command "touch storage\database.sqlite" this error message rise 'touch' is not recognized as an internal or external command, operable program or batch file. any hint to solve it ?
if you are using node.js just use npm to install it on Windows with this command:
npm install touch-cli -g
it will install the command line interface for touch, you can then use it the same as unix...
Fixed after running this command:
npm install touch-cli -g
After that I can run this:
touch .babelrc
If you are on windows device just install git bash and type the following command
touch test.html.
The above command will generate a zero kilobyte test.html file for you in your specified directory.
It is applicable to any other type of file.
If you are trying to use TypeScript in ReactNative first run:
npm install touch-cli -g
and then you can use touch, example:
touch rn-cli.config.js
Incase anyone is trying to use the 'touch' command from windows to configure Typescript for a React Native app, or anything else. It works for me by running the 'touch' command either from git bash or by downloading the WSL and running it from there.
You can type the same cmd in git bash in the folder where you want your compose file.
I use this syntax in cmd. So far it is working well without installing something.
type nul > (filename)
In my case, I used
type nul > index.js // for creating an empty Javascript file.
If all the solutions above still dont work for you. Try this:
If you already have Git installed, then you also have GIT BASH installed too... To solve this problem navigate to your project directory using the GIT BASH Terminal and try again using touch Procfile. It should work perfectly.
While Setup with Larvel mix in ExpressJs on windows touch webpack.mix.js touch is not recognized . Above methos helped me
type nul > (filename)
I was reading a solution in the GitHub community and it's effective for me.
If you are using VSCode and you would like to do something like Linux you can use git bash and it works the same. You can add git bash into VSCode by the following:
"terminal.integrated.profiles.windows": {
"Git Bash": {
"path": "C:\\Program Files\\Git\\bin\\bash.exe"
},
},
"terminal.integrated.defaultProfile.windows": "Git Bash"
Notice: Make sure you have already installed Git Bash. Good luck!
You may be using PowerShell. The team helped me Add-Content.
Link to the page
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/add-content?view=powershell-7.2&viewFallbackFrom=powershell-7.1
Example: Add-Content -Path .\Test.txt //Test.txt - name of file