【问题标题】:yarn start doesn't work after npx create-react-appnpx create-react-app 后纱线启动不起作用
【发布时间】:2021-01-05 19:05:56
【问题描述】:

我在 Mac 终端中创建了一个 react 应用:

npx create-react-app robofriends
cd my-app
yarn-start

我收到以下错误:

dyld: lazy symbol binding failed: Symbol not found: _FSEventStreamCreate<br>
  Referenced from: /robofriends/node_modules/webpack-dev-server/node_modules/fsevents/build/Release/fse.node<br>
  Expected in: flat namespace


dyld: Symbol not found: _FSEventStreamCreate<br>
  Referenced from: ./my-app/node_modules/webpack-dev-server/node_modules/fsevents/build/Release/fse.node<br>
  Expected in: flat namespace

error Command failed with exit code 1.<br>
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`

节点版本:v14.11.0

NPM 版本:6.14.8

macOS Catalina 版本 10.15.5

我的 package.json 文件:

{
  "name": "robofriends",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-scripts": "3.4.3"
  },
  "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"
    ]
  }
}

【问题讨论】:

    标签: create-react-app yarnpkg npm-start


    【解决方案1】:

    我认为是纱线开始,而不是纱线开始。而在此之前, cd 表示“更改目录”。您必须执行cd robofriends(因为是目录的名称)才能进入目录,然后运行命令yarn start

    【讨论】:

      猜你喜欢
      • 2022-01-21
      • 2021-03-05
      • 2021-06-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-15
      • 2021-09-11
      • 2020-11-04
      相关资源
      最近更新 更多