簡體   English   中英

我不能同時使用 npm 和紗線啟動帶有反應腳本的服務器?

[英]I can not start a server with react scripts using both npm and yarn?

我幾乎嘗試了一切,刪除了 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.

我的項目文件夾中可能有什么問題,為什么無法啟動服務器?

你有什么環境? 你可以試試這個這個

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM