My app opens index.html instead of index.jsx
14:26 24 Apr 2023

I created a page using React.jsx, and when I typed npm start the page opened index.jsx. However, I deleted index.html and then restored it to " public ", since then my page no longer opens index.jsx, but now it opens index.html (so the result is a white page, which when I write hello < /h1> changes. I would like to know if there is a solution for this problem... My json package if it's useful:

{
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.14.1",
    "@testing-library/react": "^13.0.0",
    "@testing-library/user-event": "^13.2.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-icons": "^4.8.0",
    "react-router-dom": "^6.10.0",
    "react-scripts": "^5.0.1",
    "web-vitals": "^2.1.0"
  },
  "scripts": {
    "start": "set NODE_OPTIONS=--openssl-legacy-provider && react-scripts start",
    "build": "set NODE_OPTIONS=--openssl-legacy-provider && react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "start-build": "npm run start & npm run build",
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "autoprefixer": "^10.4.14",
    "gh-pages": "^5.0.0",
    "postcss": "^8.4.21",
    "tailwindcss": "^3.3.1"
  }
}

I tried deleting the node_modules file and the package-lock.json file, and then I used npm install to reinstall, but it didn't work

html reactjs npm jsx delete-file