I am brand new to react. I installed it on my work computer and the first compile worked fine and it showed on the local host just fine and had the cool react logo spinning. I decided to install it on my home PC and run it, compiles fine in the terminal but the webpage that shows up is blank. I haven't changed anything in the files.
Thanks in advance for the help!
Edit: OS Windows, Node.js Version 13.8.0, npm version 6.13.6, npx 6.13.6, Browser Google Chrome
Related
I am running a fresh react project with no single line of code written by me.
All I did was:
npx create-react-app my-app
npm install
npm start
The browser window opens and within my console window I see "Starting the development server". It is stuck there, have been keeping it up for over an hour with no progress.
I looked at different SO threads as well as many suggestions on other platforms. From limiting the RAM available to using another port, closing all browser windows, rebooting my machine - nothing helped.
Do you have any suggestions for troubleshooting?
Running on macOS 13.1 on M1 Pro.
It was the directory I started the project in. Using spaces and several special characters seems to break react as well es next.js which I tried next.
Since this morning I can't launch any React JS Project in my dev server.
I explain. When I launch npm start command, all works fine, no any error message, all works as usual, it opens me a tab in my browser, but it loads forever and I just have a blank page loading.
For information, I works on a Windows System, with WSL Debian distro.
I tried to open it with http://localhost:3000, http://127.0.0.1:3000 and with my local IP adress (that's an exemple) http://192.168.0.1:3000, I also changed browser (Chrome / Edge ), and every thing is the same.
After that I launch with npm start an Express project -> it works like a charm.
I also tried with a Symfony project, here with the PHP dev server php -S 0.0.0.0:8000 -t public and same as Express, it displays normaly in my browser.
So I'm pretty sure there is something with React, but that's on all mys REact projects, not with one particulary, and again, there is no error in my console, output is like everyday, so that's very strange and I really don't get it!
If someone has any idea 🙏
image describe my problem
Hi Guys, I had this problem when I launched my React project with Live Server extension. It showed the project's folders instead of running the application. I've removed Live Server extension and reinstalled it but I've got the same issue. When I run it from the terminal with "npm run start" command it works well, please guide me because I read and test solutions being in this link link but it doesn't work.
Try your localhost:3000 or npm start
This is because your React code needs to be compiled. You can run a live server using React with
npm start
I have been having difficulty running a react app on my terminal. It was all working fine yesterday until now. I've restarted my computer 3 times, installed yarn, made sure I cd'd into my project folder.
Every time I do yarn start I get several error codes.
I have created file directories, installed webpack, created a react app (npx create-react-app project-name) and every time I run it nothing happens. Which is weird because yesterday everything was fine.
Here are some screen shots. What do I do? I can't think of anything else. I've updated npm, I have the latest version of yarn.
I am trying to install an app with react native cli but get the
ERROR: JAVA_HOME is not set and no 'java' command could be found in
your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation. Could not install the app on the
device, read the error above for details. Make sure you have an
Android emulator running or a device connected and have set up your
Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
error...
And frankly this is sooo ofrustrating... Never had an issue with ionic or cordova nor android studio but infortunally, I need some native functions for my app...
Here is a background, at first the app was installing, I even was able to run hot reload on it then out of nowhere, without any change on the computer, I get this message whenever I try :react-native run-android".... I followed exactly what's on facebook github page but got this error... So i tried running a simple app on android studio and it worked...
Can someone have solution and also why this is happening out of nowhere?
Oh, I forgot right before I got this error, for some reason, I had to reinstall npm because nodeJs was not recognizing the npm command anymore
Ps : I even uninstall then reinstall android studio, uninstalled react-native-cli and reinstalling it, uninstalled react-native-create-project, reinstalled npm.
Check like this maybe this is the issue I guess:
1.Open the App that u have created using create-react-native-app or react-native init appName in android studio
It will be something like: appName>android>local properties(SDK location)
2.If u use windows pc/laptop then go to my computer right click for properties>advanced system settings click on that and find the environmental variables
and check if they are matching
Well, I got tired of it since none of the solutions on the web worked, I just wiped out my computer, reinstalled windows, got rid of all the non needed programs, reinstalled android SDK, java, react and... Still got this error... So I set JAVA_HOME (thanks youtube) and now it is working.