【问题标题】:I can not start a server with react scripts using both npm and yarn?我无法使用 npm 和 yarn 启动带有反应脚本的服务器?
【发布时间】:2019-10-29 04:47:05
【问题描述】:

我几乎什么都试过了,删除 node_modules 几十次,删除 webpack-dev-server 和所有 webpack 包,尝试了 npm 和 yarn , 降级 react-scripts 仍然存在问题,我无法在我的项目文件夹中启动服务器。这是我的 package.json 文件:

{
  "name": "test",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "react": "^16.11.0",
    "react-dom": "^16.11.0",
    "react-scripts": "^3.0.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "test": "react-scripts test"
  }
}

我总是得到那个错误:error Command failed with exit code 1.

我的项目文件夹有什么问题,为什么服务器无法启动??

【问题讨论】:

  • 投票this proposal 以缓解 [yarn] 和 [yarnpkg] 周围的标签混淆。

标签: node.js npm yarnpkg package.json


【解决方案1】:

你有什么环境? 你可以试试thisthis

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-04-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-19
    • 1970-01-01
    • 1970-01-01
    • 2022-01-13
    相关资源
    最近更新 更多