首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我如何修复错误反应-脚本启动。react npm start在导入ml5后出现此错误

我如何修复错误反应-脚本启动。react npm start在导入ml5后出现此错误
EN

Stack Overflow用户
提问于 2020-01-26 16:26:59
回答 1查看 756关注 0票数 0

我的项目包括p5.js工作得很好,我安装了ml5,我的项目steal工作得很好,然后当我在一个组件中导入ml5.js时,得到了以下错误。如何修复此错误?

代码语言:javascript
复制
npm ERR! e-posture@0.1.0 start: `react-scripts start`
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the e-posture@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\alishahi\AppData\Roaming\npm-cache\_logs\2020-01-26T07_54_07_158Z-debug.log

我搜索并发现我的反应脚本版本可能不兼容,但我不知道如何修复它。这是我的package.json文件:

代码语言:javascript
复制
{
  "name": "e-posture",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@material-ui/core": "^4.8.3",
    "@material-ui/icons": "^4.5.1",
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.4.0",
    "@testing-library/user-event": "^7.2.1",
    "bootstrap": "^4.4.1",
    "ml5": "^0.4.3",
    "node-sass": "^4.13.1",
    "p5": "^0.10.2",
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-router-dom": "^5.1.2",
    "react-scripts": "3.3.0"
  },
  "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"
    ]
  }
}
EN

回答 1

Stack Overflow用户

发布于 2020-01-26 17:14:48

我通过两个步骤解决了这个问题: 1)删除ml5@0.4.3并安装ml5@0.3.1 2)在组件中导入p5之前的ml5,就是这些!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59916709

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档