facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.55k stars 26.8k forks source link

react-scripts are not executed correctly #9752

Open zehguilherme opened 3 years ago

zehguilherme commented 3 years ago
"scripts": {
    "start": "node node_modules/react-scripts/scripts/start.js",
    "build": "react-scripts build",
    "test": "jest",
    "eject": "react-scripts eject"
  },
"devDependencies": {
    "eslint": "6.6.0",
    "eslint-config-airbnb": "^18.2.0",
    "eslint-config-prettier": "^6.11.0",
    "eslint-plugin-import": "^2.22.0",
    "eslint-plugin-jsx-a11y": "^6.3.1",
    "eslint-plugin-react": "^7.20.3",
    "eslint-plugin-react-hooks": "^4.0.8",
    "jest": "24.9.0",
    "prettier": "^2.0.5"
  }

image

warent commented 3 years ago

I noticed something really weird. For some reason my react-scripts/package.json seems to be outdated on the latest version.

{
  "bin": {
    "react-scripts": "bin/react-scripts.js"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "bugs": {
    "url": "https://github.com/facebook/create-react-app/issues"
  },
  "bundleDependencies": false,
  "dependencies": {
    "@babel/core": "7.9.0",
    "@svgr/webpack": "4.3.3",
    "@typescript-eslint/eslint-plugin": "^2.10.0",
    "@typescript-eslint/parser": "^2.10.0",
    "babel-eslint": "10.1.0",
    "babel-jest": "^24.9.0",
    "babel-loader": "8.1.0",
    "babel-plugin-named-asset-import": "^0.3.6",
    "babel-preset-react-app": "^9.1.2",
    "camelcase": "^5.3.1",
    "case-sensitive-paths-webpack-plugin": "2.3.0",
    "css-loader": "3.4.2",
    "dotenv": "8.2.0",
    "dotenv-expand": "5.1.0",
    "eslint": "^6.6.0",
    "eslint-config-react-app": "^5.2.1",
    "eslint-loader": "3.0.3",
    "eslint-plugin-flowtype": "4.6.0",
    "eslint-plugin-import": "2.20.1",
    "eslint-plugin-jsx-a11y": "6.2.3",
    "eslint-plugin-react": "7.19.0",
    "eslint-plugin-react-hooks": "^1.6.1",
    "file-loader": "4.3.0",
    "fs-extra": "^8.1.0",
    "fsevents": "2.1.2",
    "html-webpack-plugin": "4.0.0-beta.11",
    "identity-obj-proxy": "3.0.0",
    "jest": "24.9.0",
    "jest-environment-jsdom-fourteen": "1.0.1",
    "jest-resolve": "24.9.0",
    "jest-watch-typeahead": "0.4.2",
    "mini-css-extract-plugin": "0.9.0",
    "optimize-css-assets-webpack-plugin": "5.0.3",
    "pnp-webpack-plugin": "1.6.4",
    "postcss-flexbugs-fixes": "4.1.0",
    "postcss-loader": "3.0.0",
    "postcss-normalize": "8.0.1",
    "postcss-preset-env": "6.7.0",
    "postcss-safe-parser": "4.0.1",
    "react-app-polyfill": "^1.0.6",
    "react-dev-utils": "^10.2.1",
    "resolve": "1.15.0",
    "resolve-url-loader": "3.1.1",
    "sass-loader": "8.0.2",
    "semver": "6.3.0",
    "style-loader": "0.23.1",
    "terser-webpack-plugin": "2.3.8",
    "ts-pnp": "1.1.6",
    "url-loader": "2.3.0",
    "webpack": "4.42.0",
    "webpack-dev-server": "3.11.0",
    "webpack-manifest-plugin": "2.2.0",
    "workbox-webpack-plugin": "4.3.1"
  },
  "deprecated": false,
  "description": "Configuration and scripts for Create React App.",
  "devDependencies": {
    "react": "^16.12.0",
    "react-dom": "^16.12.0"
  },
  "engines": {
    "node": ">=8.10"
  },
  "files": [
    "bin",
    "config",
    "lib",
    "scripts",
    "template",
    "template-typescript",
    "utils"
  ],
  "gitHead": "d2f813f8897ffcd2f0b0d2da75d0c44924c92f4d",
  "homepage": "https://github.com/facebook/create-react-app#readme",
  "license": "MIT",
  "name": "react-scripts",
  "optionalDependencies": {
    "fsevents": "2.1.2"
  },
  "peerDependencies": {
    "typescript": "^3.2.1"
  },
  "peerDependenciesMeta": {
    "typescript": {
      "optional": true
    }
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/facebook/create-react-app.git",
    "directory": "packages/react-scripts"
  },
  "types": "./lib/react-app.d.ts",
  "version": "3.4.3"
}

Even though the version is latest, the dependencies are wrong. For example, you can see the eslint version is off: "eslint": "^6.6.0", should actually be ^7.9.0 https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/package.json#L47

wondering if an old version of react-scripts was accidentally published?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.