So I have been working on CRA and NextJS projects for the last 5-6 months and it works every time but since yesterday, I have no idea what has happened but every time I run my project I cannot access it at localhost:3000.
This message is displayed usually when a NextJS app starts -
started server on 0.0.0.0:3000, url: http://localhost:3000
Localhost gives me the following -
However when I go to 0.0.0.0:3000 , I'm able to access my application normally.
I have no idea what has happened,
My suspicion is the PHP live server extension in VS Code, I accidentally clicked on it and my localhost hasn't been working since. I have since uninstalled and removed PHP Live server extension, flushed my dns, cleared my cache but no changes yet.
I have tried multiple different projects and even a fresh CRA install to diagnose and the problem persists.
Any help would be greatly appreciated.
Thank you for your time.
Related
I have a Next.js project that has been a real delight to work on until recently when changes stopped showing up in the browser. Normally the browser hot reloads, but now even hitting refresh won't show changes to the code—I have to shut down the dev server and run npm run dev again to get the changes to show up. This doesn't happen in all my Next.js projects—just one of them.
I've tried deleting the .next/ directory, but that didn't fix the problem. Any other ideas of where I could look to get this back to normal?
Next 12.1.0
Node 14.18.1
macOS 12.3
I had the same issue. In my case it was case sensitivity.
It turned out I renamed one of my components where the new name only had a letter changed from uppercase to lowercase (e.g. MyCOmponent.tsx -> MyComponent.tsx).
I made all the changes everywhere but missed one, the import path of the component in one of the pages.
I had: import MyComponet from '../../MyCOmponent.tsx'
Everything still worked when restarting the server, but hot reload or even browser refresh wouldn't, same as OP. Fixing the typo fixed everything.
I faced the same issue. I created a new file with a different name and copied all the content which was inside the file that did not show the changes. Then it started showing the changes in the browser.
Some of my personal apps and my professional apps on Heroku are not accessible.
They don't have a custom domain linked, so I access them via http://.herokuapp.com
Most of the time, they work great, but often I receive following response from my browser
This site can’t be reached
<myapp>.herokuapp.com’s server IP address could not be found.
DNS_PROBE_FINISHED_NXDOMAIN
The app is up and running. It does not crash (as I haven't made any changes to it in a while).
I have tried restarting all dynos, to which the log says that the app is up and running and the db is connected.
Heroku is also not reporting any of their services to being down either.
How can I resolve this issue?
I have read a similar question, but the only result coming from it was that Heroku was temporarily down. So please don't link that one again.
Update
Without any of my interference, the application can be reached again on Heroku. How is this possible if Heroku says that there were no problems with their app platforms?
And more important: is there a way to defend against this?
I've been working on a web app (front Angular, back Node/Express/Mongo) for a few months now.
I run Angular on localhost:4200 and Node on localhost:3000
Some people in our team are running the backend in a VM that runs on their computers.
So that the app works in both cases we've edited the windows hosts file to make the app point to the correct place (either the VM or the back on the local machine)
127.0.0.1 mysite
Developers using the VM changed 127.0.0.1 with their VM's IP.
Everything worked smoothly.
A few days ago, our company installed bitlocker on every PC and I believe it caused our setup to break for everyone not using the VM (which is not subject to bitlocker)
People working on localhost started receiving from the front app:
OPTIONS http://mysite:3000/auth/login 426 (Upgrade
Required)
The requests are not even hitting the Node server. Looks like they're redirected to a websocket server?
If I change the requests to target localhost:3000 the app works again but we lose the setup for people working on the VM. (thus committing code becomes annoying if we need to change the base url each time)
I could make an environment for each case but it's not clean and I'd like to know why it suddenly broke.
Try changing the port from 3000 to something else.
I just ran into this issue when a coworker tried running an express app we've been building on a Windows machine for the first time, as opposed to an EC2 instance. I've been using a Mac during development.
The issue seemed to be that 0.0.0.0:3000 was already mapped on company Windows machines. If you run netstat -an in a command prompt you may see it in use already.
hello mate this usually happens due to protocol mismatch between the PC and server.TLS 1.0 and 1.1 were permanently deprecated on June 4 2018. I suspect you’re using something that still uses and old version of TLS.
I am working on a angular project that i cloned form git. When I modified some code and started dev server it doesn't detect changes made, but when i saved file again, while server is still running the changes are detected...can any one help me to resolve the issue...
So I'm getting a blue screen of death whenever I have "npm start" running for a reactjs app. It's an intermittent crash, i.e. it doesn't happen every time I run it nor are there any exact steps to duplicate the crash, but I'll try to explain below under what circumstances it happens.
Create a reactjs app using create-react-app npm module.
Start the app using npm start. Chrome window opens, webpack is listening to changes I make to the source files.
Change any source file, and save it. NPM compiles it, Chrome page refreshes, and I can see my changes.
The above things work fine as expected "normally", but once in a while, right after I save a file, the system crashes with a BSOD saying DRIVER_IRQL_NOT_EQUAL_TO_OR_GREATER_THAN (NETIO.SYS) There is no definite "step" or action other than saving the file, or refreshing Chrome that would cause this to happen, and it also doesn't happen every single time.
Here are the steps I took to find out/eliminate the root cause of this issue:
Disabled by AV (Symantec Endpoint Protection).
Use a different browser (Mozilla, hell, even IE).
Changed the system (used a different laptop, although the same type - Microsoft Surface on Windows 10)
Updated all drivers, etc. (Verified by my organization admins)
Closing all other programs, etc. that might potentially be interfering (Atom IDE, Eclipse, etc.)
The necessary conditions for the crash to happen are:
npm start must be running (webpack server on localhost:3000)
A browser window must be open connected to localhost:3000 (if no browser is connected, it doesn't crash even if you change and save the file 200 times - I checked). Also, doesn't matter which browser (Checked with Mozilla/Edge/Chrome)
I believe the crash happens when NPM is recompiling the files and serving it to the browser (asking it to refresh using some websockets), but I'm not an expert on NodeJS/NPM so I'm not sure.
I've been stuck on this issue for more than 2 weeks now. Any help would be really appreciated. Kindly let me know if more information is needed.
The issue was with Symantec DLP (Data Loss Prevention) that was also installed on all our systems. The issue resolved itself after the admins added application exceptions for Nodejs, NPM, my reactjs project workspace paths.
Just posting this so that in case someone has a similar issue they can try this or remove Symantec DLP altogether.