最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

无法再缩小束。错误:从静态更简洁 JSmain.68c81611.chunk.js

运维笔记admin15浏览0评论

无法再缩小束。错误:从静态更简洁/ JS / main.68c81611.chunk.js

无法再缩小束。错误:从静态更简洁/ JS / main.68c81611.chunk.js

我得到这个错误,当我运行

npm run deploy

在我反应过来的项目。到目前为止,我还没有添加任何外部依赖,除了GH-页面模块。

的package.json文件:

  {
  "name": "data-validation",
  "version": "0.1.0",
  "private": true,
  "homepage": "/",
  "dependencies": {
    "gh-pages": "^2.0.1",
    "react": "^16.7.0",
    "react-dom": "^16.7.0",
    "react-scripts": "2.1.3"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build",
    "eject": "react-scripts eject"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ]
}

以下是错误消息我得到

Failed to minify the bundle. Error: static/js/main.68c81611.chunk.js from Terser
//long stacktrace




npm ERR! code ELIFECYCLE

npm ERR! errno 1
npm ERR! [email protected] build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build 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\Kristoffer\AppData\Roaming\npm-cache\_logs\2019-02-02T22_38_15_532Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] predeploy: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] predeploy 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\Kristoffer\AppData\Roaming\npm-cache\_logs\2019-02-02T22_38_15_570Z-debug.log

我试图删除文件夹node_modules和做的

npm install 

但现在看来它可能是旧的依赖会出现同样的问题?

回答如下:

这似乎是一个更简洁(3.16)的当前版本的问题,现在,你应该在你的package.json设置的版本3.14.1如下:"terser": "3.14.1",

发布评论

评论列表(0)

  1. 暂无评论