You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything worked fine yesterday morning. But in the evening, this unexpected error appeared for the first time when I tried npm start on the client.
I tried to fix the issue following some suggestions I found after searching. I deleted the node_modules folder and package-lock.json file and executed npm i once again, thus re-installing all dependencies. It showed this:
The previous error still persisted. Following the instruction, I executed npm audit fix --force , and the only change that I noticed it made was upgrading react-scripts to version 5.0.0 from 4.0,3. This fixed the previous error, and now the code compiles well :
However, on opening localhost:3000 it shows connection refused :
So, I am still unable to access the development server.
An interesting fact is that on executing npm run build, the build completes successfully. This exact client side code is also successfully hosted on netlify right now. So I hope my code and syntax is working fine. But I am unable to find why I am facing error in development mode.
node version v16.6.1
npm version 7.20.3
OS: Windows 11
It would be really nice if someone could clone this repo in their device and try running npm start in the client folder (after installing the dependencies with npm install ), and check if they face the issue as well.
As mentioned before, the build occurs successfully even with react-scripts version 4.0.3. The development server was also running fine in the morning. But it suddenly didn't work in the evening although I had made no changes to the code.
The text was updated successfully, but these errors were encountered:
Update: The issue is solved after removing the setupProxy.js file. There was something wrong in that file that was causing the error. I haven't figured what was wrong yet, but I have achieved the proxying functionality by adding "proxy":"http://localhost:5000" to the package.json file. This alternative way of proxying works fine.
Are you able to set proxy in package.json? We are encountering this issue facebook/create-react-app#11762 which will fail when defining proxy in package.json
Everything worked fine yesterday morning. But in the evening, this unexpected error appeared for the first time when I tried
npm start
on the client.I tried to fix the issue following some suggestions I found after searching. I deleted the
node_modules
folder andpackage-lock.json
file and executednpm i
once again, thus re-installing all dependencies. It showed this:The previous error still persisted. Following the instruction, I executed
npm audit fix --force
, and the only change that I noticed it made was upgradingreact-scripts
to version5.0.0
from4.0,3
. This fixed the previous error, and now the code compiles well :However, on opening
localhost:3000
it shows connection refused :So, I am still unable to access the development server.
An interesting fact is that on executing
npm run build
, the build completes successfully. This exact client side code is also successfully hosted on netlify right now. So I hope my code and syntax is working fine. But I am unable to find why I am facing error in development mode.node version v16.6.1
npm version 7.20.3
OS: Windows 11
It would be really nice if someone could clone this repo in their device and try running
npm start
in the client folder (after installing the dependencies withnpm install
), and check if they face the issue as well.As mentioned before, the build occurs successfully even with
react-scripts version 4.0.3
. The development server was also running fine in the morning. But it suddenly didn't work in the evening although I had made no changes to the code.The text was updated successfully, but these errors were encountered: