How to run the Reactjs Web Application in localhost:3000 in windows - node.js

I'm a new React Developer, and I'm having a problem in running it to my chrome. I already did the npm install in cmd, and then I npm start by its not starting because of error in cmd. And my OS is Windows 10.
What should I do?

in your package.json file the script define rm command witch is not available in windows that's why you are getting error
insted of rm change it to del
and if there is any UNIX specific command then change it to windows equivalent

Related

nodejs is either not installed or its executable not present in path

Whenever running an Appium test while starting appium server am facing an error saying nodejs is either not installed or its executable not present in path
I have installed node-js in my machine also installed appium through the command npm install -g appium
You need to pass two arguments under appiumdriver like in this way AppiumDriver(url,cap);
URL:- appium point url.
Cap:- desiredCapability instance.

Cannot run sudo when using ngrok to develop locally for Slack with a windows PC

I'm looking at the following document: https://api.slack.com/tutorials/tunneling-with-ngrok. I cannot get passed 'step 4' as I'm running Windows and it is geared for Mac.
On step 4, it is asking me to run:
sudo node index.js
sudo is not a command prompt command and I'm unsure how to execute the code. What command should I use to replace sudo?
Since you are Windows, you don't need sudo. Assuming you have NodeJS installed on your Windows machine, you should be able to run node index.js
I think there was some saving issues. It's been resolved.

npm.cmd closes instantly after few seconds

I'm learning nodeJs. I managed to run nodejs commands on cmd and it works fine. Now I want to install express framework and for that in the tutorial I'm following it asks to type sudo install -g express on npm command prompt. So I typed npm in my windows search, and clicked on it. Right after few seconds less than 3 it closes straight away.
I found that npm.cmd exist in nodejs directory where node.exe found. What could be the problem here. If I were to type the above mentioned command in windows cmd, it says sudo is unrecognized program.SO must I use npm cmd?
After running cmd.exe , I guess you would have node installed but still run node -v , it should respond with the version meaning it's working.
Now if you want to explicitly install express.js you just have to run on, the command prompt itself,
npm install express -g.
Anyways you can follow this link from their official website. Hope it helps. Also sudo is a program for Unix like operating systems, just in case you needed it.

Errors installing socket.io for node.js

I installed node on my windows 8 machine with no problems and then went to install the socket.io package to use for an assignment. After typing
npm install socket.io
I got a huge amount of errors.
What I've tried so far:
this - nodejs npm install socket.io error
and this - NPM - Can't install socket.IO
The first answer in both.
A lot of the other stuff I'm finding is for either windows 7 or Mac so I'm not sure if this is just a windows 8 thing.
As you can see in logs you have a permission error. Script doesn't have enough permissions to create directory in C:\\Program_Files\.... Use other directory instead or run command with Admin permissions.
Try running
npm install socket.io
except this time run the command line as an administrator. You can do this in Windows 8 by going to your app search, typing cmd, right-clicking then click 'Run as administrator'.
I feel this is the issue because your error message says 'Please try running this command again as root/Administrator'.

how can I open web application requiring node.js

I must run micro-crawler https://github.com/WebMole/Micro-Crawler which is a crawler web application, that run with node.js.
I could not figure out how to open this app, I download node.js, and when I write install npm and install bower to the node.js command line nothing happened. Also I did not understand how to start web applicaion after installations
Please help me
Finally I solved the issue
First, I install node.js, then move node.js folder to wampserver directory,
and move the web sites files in the node.js directory
Second, I go to the path where node.js is from command line, then enter "install npm" command
line
The error appeared in this phase for solving I create a npm
folder in c:users/user_name_of_your_computer/app_data/roaming then I installed git and enter the directories of bin and cmd files of git to the system enviroments/path
Third I enter the commands "bower install" and "npm install -g grunt-cli" from the comand. from the path of where node.js is
and the micro-crawler works
Did you execute your .js file? You can do that with node.js cli thus:
path/to/your/file: node file.js
This is a good reference:
How to run a hello.js file in Node.js on windows?

Resources