纱线构造:“无法缩小束”来自terser的错误

时间:2019-05-17 12:30:37

标签: javascript reactjs npm yarnpkg

我希望我的React应用程序可以投入生产。 我在尝试跑步时遇到了问题

 yarn build    

2天

我尝试过的事情:

尝试安装3.14 terser版本,将terser添加到package.json的分辨率块中,删除package.json.lock或yarn.lock文件。删除node_modules文件夹并使用npm。 顺便说一句,纱线制造对新项目来说效果很好。

错误描述:

Terser出现错误,名称应为

链接到错误日志屏幕截图:

https://i.stack.imgur.com/HDZR9.png

Package.json:

     {
  "name": "client",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "axios": "^0.18.0",
    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "react-ionicons": "^3.0.1",
    "react-redux": "^7.0.3",
    "react-router-dom": "^5.0.0",
    "react-scripts": "3.0.1",
    "react-spinners": "^0.5.4",
    "redux": "^4.0.1",
    "redux-thunk": "^2.3.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "resolutions": {
    "terser": "3.14.1"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

0 个答案:

没有答案