localhost runs for a long time (react)

32 views Asked by At

I am new to programming with React, I used create-react-app to create my app, everything worked right but when I added more components to my code, localhost got stuck and kept loading, then after some time i got the "out of memory" error in http://localhost:3000/ in my browser. I tried open a new react app and it is worked well, until i added components.

I tried to restore my computer, clean cookies in browser, deleted node modules and then restore it. Nothing worked.

Node version v20.2.0

Here is package.json:

{
  "name": "daniel",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.17.0",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-router-dom": "^6.22.3",
    "react-scripts": "5.0.1",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}
0

There are 0 answers