javascript - Failed to minify the bundle. Error: staticjsmain.68c81611.chunk.js from Terser - Stack Overflow

I get this error, when i run npm run deployon my react project. So far i have not added any external de

I get this error, when i run

npm run deploy

on my react project. So far i have not added any external dependencies, except the gh-pages module.

package.json file:

  {
  "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"
  ]
}

here is the error message i get

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 plete 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 plete 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

i tried deleting the node_modules folder and doing an

npm install 

but the same issue occurs it appears it may be an old dependency?

I get this error, when i run

npm run deploy

on my react project. So far i have not added any external dependencies, except the gh-pages module.

package.json file:

  {
  "name": "data-validation",
  "version": "0.1.0",
  "private": true,
  "homepage": "https://kristoffertolboll2.github.io/react-js-data-validation/",
  "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"
  ]
}

here is the error message i get

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 plete 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 plete 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

i tried deleting the node_modules folder and doing an

npm install 

but the same issue occurs it appears it may be an old dependency?

Share Improve this question asked Feb 2, 2019 at 22:42 Kristoffer TølbøllKristoffer Tølbøll 3,3579 gold badges40 silver badges86 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 3

For yarn users: add the following field to package.json and then rerun

"resolutions": {
  "terser": "3.14.1"
}

If npm

run npm [email protected]

That seems to be a problem with the current version of terser (3.16), by now, you should set the version to 3.14.1 in your package.json as follows: "terser": "3.14.1",

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745437598a4627680.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信