1

I have been trying several times, changing with some libraries or updating others, but nothing, I don't understand why it worked fine for me a few weeks ago and now it doesn't want to build. I hope you can shed some light on this problem, because I really don't know where the problem would be.

Maybe some dependency ?

node v. 14.19.3

Creating an optimized production build...
Failed to compile.

./node_modules/pdfmake/build/pdfmake.js 15400:112
Module parse failed: Unexpected token (15400:112)

You may need an appropriate loader to handle this file type.

| * 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;

npm ERR! code ELIFECYCLE
npm ERR! errno 1

Here is my package.json:

{
    "name": "foo",
    "version": "1.0.0",
    "private": true,
    "dependencies": {
        "@hookform/resolvers": "^2.9.7",
        "amazon-cognito-identity-js": "^4.3.2",
        "aws-amplify": "^3.0.7",
        "aws-amplify-react": "^3.1.1",
        "axios": "^0.21.1",
        "chart.js": "^2.9.3",
        "crypto-js": "^3.1.9-1",
        "exif-js": "2.3.0",
        "formik": "^2.0.4",
        "framer-motion": "^1.6.17",
        "i": "^0.3.6",
        "lyef-switch-button": "^2.0.1",
        "materialize-css": "^1.0.0-rc.2",
        "moment": "^2.24.0",
        "node-sass": "^4.14.0",
        "pdfmake": "0.1.41",
        "react": "16.8.6",
        "react-chartjs-2": "^2.8.0",
        "react-csv": "^2.0.3",
        "react-dom": "16.8.6",
        "react-gtm-module": "^2.0.7",
        "react-hook-form": "^4.9.8",
        "react-idle-timer": "^5.4.0",
        "react-input-mask": "^2.0.4",
        "react-input-range": "^1.3.0",
        "react-loading-io": "^2.2.0",
        "react-materialize": "3.3.5",
        "react-number-format": "^4.2.0",
        "react-owl-carousel": "^2.3.3",
        "react-range-picker": "0.6.1",
        "react-redux": "^7.1.0-rc.1",
        "react-responsive": "^7.0.0",
        "react-responsive-modal": "6.1.0",
        "react-router-dom": "^5.1.0",
        "react-scripts": "2.1.8",
        "react-scroll": "1.7.7",
        "react-select": "^3.1.0",
        "react-super-responsive-table": "^5.1.1",
        "react-switch": "^5.0.1",
        "react-toastify": "^5.4.1",
        "react-toasts": "^3.0.6",
        "redux": "4.0.1",
        "redux-actions": "2.6.5",
        "redux-logger": "3.0.6",
        "redux-persist": "^5.10.0",
        "redux-react-session": "2.5.0",
        "redux-thunk": "2.3.0",
        "semantic-ui-react": "^0.88.1",
        "uuid": "^7.0.3",
        "yup": "^0.32.9"
    },
    "scripts": {
        "start": "react-app-rewired start ",
        "build": "react-app-rewired  build ",
        "test": " ",
        "eject": "react-scripts eject",
        "generate-build-version": "node generate-build-version",
        "prebuild": "npm run generate-build-version"
    },
    "browserslist": [
        ">0.2%",
        "not dead",
        "not ie <= 11",
        "not op_mini all"
    ],
    "devDependencies": {
        "react-app-env": "^1.2.3",
        "react-app-rewired": "^2.1.5"
    }
}

I was only running the command to build the app

npm run build

JmC
  • 31
  • 2
  • Does this answer your question? [Module parse failed: Unexpected token (257:106) You may need an appropriate loader to handle this file type](https://stackoverflow.com/questions/74323826/module-parse-failed-unexpected-token-257106-you-may-need-an-appropriate-load) – Chris W Nov 07 '22 at 12:38

0 Answers0