Issue
I am trying build frontend app using npm run build
using jenkins.But getting below error. Could you let me know, how to fix below error?
Creating an optimized production build...
Failed to compile.
./node_modules/xlsx/jszip.js 7855:112
Module parse failed: Unexpected token (7855:112)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| * not null.
| */
> function gen_bitlen(s, desc) /* deflate_state *s;*/ /* tree_desc *desc; /* the tree descriptor */*/{
| var tree = desc.dyn_tree;
| var max_code = desc.max_code;
I am using nodejs version v16.18.1 and npm version 8.19.2..
Solution
I am using Angular 11 same as you, I think some upgrade packages when installed fail.
I overwrote the new package-lock.json with the old one and my Angular/react app was built and ran successfully again.
Answered By - Nguyễn Hoàng Thái
Answer Checked By - Cary Denson (JavaFixing Admin)