0

在我的前端使用 yarn start 时,我不断收到错误消息:

/bin/sh: react-scripts: command not found error 命令失败,退出代码为 127。 info 访问https://yarnpkg.com/en/docs/cli/run以获取有关此命令的文档。

这是我的代码

"name": "frontend",
  "version": "0.1.0",
  "license": "MIT",
  "description": "Typescript starter template for hardhat, ethers and react projects using typescript and @web3-react",
  "engines": {
    "node": "16.13.1",
    "npm": "8.1.2"
  },
  "dependencies": {
    "@testing-library/jest-dom": "^5.14.1",
    "@testing-library/react": "^12.0.0",
    "@testing-library/user-event": "^13.2.1",
    "@types/jest": "^27.0.1",
    "@types/node": "^16.7.13",
    "@types/react": "^17.0.20",
    "@types/react-dom": "^17.0.9",
    "@types/styled-components": "^5.1.18",
    "@web3-react/core": "^6.1.9",
    "@web3-react/injected-connector": "^6.0.7",
    "ethers": "^5.5.2",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-scripts": "5.0.0",
    "styled-components": "^5.3.3",
    "typescript": "^4.4.2"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "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": {
    "@types/styled-components": "^5.1.18"
  }
}

有任何想法吗?

4

0 回答 0