/ bin / sh:SET:找不到命令

柔音

我克隆了一个包含以下内容的react项目package.json之后yarnyarn start给了我以下错误。我试过了yarn add react-scripts start,但是还是没用。

我正在使用MacOS。

有人可以帮忙吗?

$ yarn start
yarn run v1.21.1
$ SET PORT=8000 && react-scripts start
/bin/sh: SET: command not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

package.json

{
  "name": "frontend",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@material-ui/core": "^4.9.8",
    "@microsoft/office-js-helpers": "^1.0.2",
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "@types/react-stripe-elements": "^6.0.4",
    "@uifabric/react-cards": "^0.109.49",
    "axios": "^0.19.2",
    "color": "^3.1.2",
    "cross-storage": "^1.0.0",
    "dva": "^2.4.1",
    "dva-model-creator": "^0.4.3",
    "formik": "^2.1.4",
    "lodash": "^4.17.15",
    "moment": "^2.24.0",
    "monaco-editor": "^0.20.0",
    "node-sass": "^4.13.1",
    "office-ui-fabric-react": "^7.105.4",
    "query-string": "^6.11.1",
    "react": "^16.13.1",
    "react-app-polyfill": "^1.0.6",
    "react-dom": "^16.13.1",
    "react-monaco-editor": "^0.35.0",
    "react-scripts": "3.4.1",
    "react-stripe-elements": "^6.1.1",
    "redux-devtools-extension": "^2.13.8",
    "styled-components": "^5.0.1",    
    "typescript": "^3.8.3",
    "yup": "^0.28.3"
  },
  "scripts": {
    "start": "SET PORT=8000 && react-scripts start",
    "build": "react-scripts --max_old_space_size=8096 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"
    ]
  },
  "devDependencies": {
    "@types/color": "^3.0.1",
    "@types/cross-storage": "^0.8.29",
    "@types/jest": "^25.1.4",
    "@types/lodash": "^4.14.149",
    "@types/node": "^13.9.5",
    "@types/query-string": "^6.3.0",
    "@types/react": "^16.9.27",
    "@types/react-dom": "^16.9.5",
    "@types/react-redux": "^7.1.7",
    "@types/styled-components": "^5.0.1",
    "@types/yup": "^0.26.33"
  }
}
awarrier99

我认为您正在寻找的是在执行命令之前设置环境变量:PORT=8000 react-scripts start,因为Linux / Unix系统不像Windows那样使用SET命令来设置环境变量

如果遇到react-scripts找不到命令的问题,请使用以下命令直接引用软件包的本地版本:PORT=8000 ./node_modules/.bin/react-scripts start

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Eclipse / bin / sh:g ++:找不到命令

来自分类Dev

Docker:找不到容器命令'/ bin / sh'

来自分类Dev

/ bin / sh:cc:找不到命令

来自分类Dev

Synology / bin / sh:找不到命令

来自分类Dev

/ bin / sh:ntpq:找不到命令

来自分类Dev

/ bin / sh:clang ++:找不到命令

来自分类Dev

找不到LFS 6.7 / bin / sh命令

来自分类Dev

crontab-/ bin / sh:wget:找不到命令

来自分类Dev

/ bin / sh:第62行:至:找不到命令

来自分类Dev

/ bin / sh:/ usr / bin / wkhtmltopdf:找不到

来自分类Dev

/ bin / sh:jlink:找不到。命令'/ bin / sh -c jlink'返回非零代码:127

来自分类Dev

无法使用Java OpenJDK 14构建。/ bin / sh:javac:找不到命令

来自分类Dev

使用cronjob使用参数运行python脚本会给出错误:/ bin / sh:密码:找不到命令

来自分类Dev

Android子进程上的Python:/ bin / sh:ls:找不到

来自分类Dev

Ubuntu docker镜像/ bin / sh:1:ufw:找不到

来自分类Dev

反应本机错误-react-native-xcode.sh:第45行:react-native:找不到命令Command / bin / sh失败,退出代码为127

来自分类Dev

Vim-LatexSuite:/ bin / bash:找不到乳胶命令

来自分类Dev

sudo -i问题-sudo:/ bin / bash / asd:找不到命令

来自分类Dev

~/bin 中的 Shell 脚本正常工作,但找不到命令

来自分类Dev

sh:找不到命令

来自分类Dev

sh:找不到命令

来自分类Dev

Chroot找不到`/ bin / bash`

来自分类Dev

找不到/ usr / bin / python

来自分类Dev

第1行:?#!/ usr / bin / sh:在尝试执行Shell脚本时找不到

来自分类Dev

为什么在基于阿尔卑斯的docker-compose构建中找不到bin / sh?

来自分类Dev

为什么Docker“在$ PATH中找不到可执行文件`/ bin / sh`”?

来自分类Dev

无法在ubuntu 18.04 docker / bin / sh中安装pip:1:pip:找不到

来自分类Dev

无法创建Dockerfile映像/ bin / sh:apt-get:找不到

来自分类Dev

为什么我得到这个/ bin / sh:1:^ Mno:找不到错误

Related 相关文章

  1. 1

    Eclipse / bin / sh:g ++:找不到命令

  2. 2

    Docker:找不到容器命令'/ bin / sh'

  3. 3

    / bin / sh:cc:找不到命令

  4. 4

    Synology / bin / sh:找不到命令

  5. 5

    / bin / sh:ntpq:找不到命令

  6. 6

    / bin / sh:clang ++:找不到命令

  7. 7

    找不到LFS 6.7 / bin / sh命令

  8. 8

    crontab-/ bin / sh:wget:找不到命令

  9. 9

    / bin / sh:第62行:至:找不到命令

  10. 10

    / bin / sh:/ usr / bin / wkhtmltopdf:找不到

  11. 11

    / bin / sh:jlink:找不到。命令'/ bin / sh -c jlink'返回非零代码:127

  12. 12

    无法使用Java OpenJDK 14构建。/ bin / sh:javac:找不到命令

  13. 13

    使用cronjob使用参数运行python脚本会给出错误:/ bin / sh:密码:找不到命令

  14. 14

    Android子进程上的Python:/ bin / sh:ls:找不到

  15. 15

    Ubuntu docker镜像/ bin / sh:1:ufw:找不到

  16. 16

    反应本机错误-react-native-xcode.sh:第45行:react-native:找不到命令Command / bin / sh失败,退出代码为127

  17. 17

    Vim-LatexSuite:/ bin / bash:找不到乳胶命令

  18. 18

    sudo -i问题-sudo:/ bin / bash / asd:找不到命令

  19. 19

    ~/bin 中的 Shell 脚本正常工作,但找不到命令

  20. 20

    sh:找不到命令

  21. 21

    sh:找不到命令

  22. 22

    Chroot找不到`/ bin / bash`

  23. 23

    找不到/ usr / bin / python

  24. 24

    第1行:?#!/ usr / bin / sh:在尝试执行Shell脚本时找不到

  25. 25

    为什么在基于阿尔卑斯的docker-compose构建中找不到bin / sh?

  26. 26

    为什么Docker“在$ PATH中找不到可执行文件`/ bin / sh`”?

  27. 27

    无法在ubuntu 18.04 docker / bin / sh中安装pip:1:pip:找不到

  28. 28

    无法创建Dockerfile映像/ bin / sh:apt-get:找不到

  29. 29

    为什么我得到这个/ bin / sh:1:^ Mno:找不到错误

热门标签

归档