Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
33
rated 0 times [  37] [ 4]  / answers: 1 / hits: 81623  / 10 Years ago, mon, october 13, 2014, 12:00:00

So I'm attempting to do this Node.js tutorial, and it says to create three .js files from the command line.



touch server.js client.js test.js



Except I get the following error:




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




Not sure what is wrong here. I've installed Node.js as well as npm and browserify. I've created the package.json file correctly.



I suppose I could go into the project directory, right click and make a new file that way, but that defeats the purpose doesn't it?



What is the actual command to create a new file in the command line?



I'm using Windows 7.


More From » node.js

 Answers
8

That command is for a unix environment. You can use the following to create an empty file with similar functionalities that touch has in windows:



echo $null >> server.js in the desired directory


[#69138] Friday, October 10, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
luna

Total Points: 698
Total Questions: 114
Total Answers: 93

Location: Israel
Member since Wed, Apr 14, 2021
3 Years ago
luna questions
;