简体   繁体   中英

undefined:1625 throw new JS_Parse_Error(message, filename, line, col, pos);

I am using usemin and I have this error with the bootstrap file, if I make the reference from the page if it works no fun:

It works well:

error:

undefined:1625 throw new JS_Parse_Error(message, filename, line, col, pos); ^ JS_Parse_Error [SyntaxError]: Invalid assignment at JS_Parse_Error.get (eval at (C:\Users\NIXON\Documents\mi_pagina_web\node_modules\usemin\node_modules\uglify-js\tools\node.js:27:1), :86:23) at formatError (internal/util/inspect.js:1140:38) at formatRaw (internal/util/inspect.js:910:14) at formatValue (internal/util/inspect.js:765:10) at inspect (internal/util/inspect.js:310:10) at afterInspector (internal/errors.js:718:14) { filename: 'node_modules\bootstrap\dist\js\bootstrap.min.js', line: 6, col: 629, pos: 866 } npm ERR. code ELIFECYCLE npm ERR. errno 1 npm ERR: mi_pagina_web@1.0.0 usemin: usemin index.html -d dist --htmlmin -o dist/index.html && usemin about.html -d dist --htmlmin -o dist/about.html && usemin productos.html -d dist --htmlmin -o dist/productos.html && usemin contacto.html -d dist --htmlmin -o dist/contacto.html npm ERR. Exit status 1 npm ERR. npm ERR. Failed at the mi_pagina_web@1.0.0 usemin 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\NIXON\AppData\Roaming\npm-cache_logs\2021-07-31T18_30_28_567Z-debug.log

You have problem with an incompatibility between bootstrap file and uglify using es6, you can try exclude this file because is already minified and for custom files maybe modify them to complies es5 standards.

Also you can change uglify and configure in order to use es6 check this other question maybe gives you more answers

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM