surveyjs / surveyjs_react_quickstart

SurveyJS + React Quickstart Template
http://surveyjs.io
137 stars 73 forks source link

npm build doesn't work #24

Open sokoow opened 3 years ago

sokoow commented 3 years ago

Hi All,

Nice project, but I can't generate a static js build out of it:

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

Failed to minify the code from this file: 

    ./node_modules/regl-line2d/index.js:12 

Read more here: http://bit.ly/2tRViJ9

probably some version mismatch with react I guess

fredrodriguesof commented 3 years ago

Same problem here.

easyrun32 commented 2 years ago

Replace package.json with this

{
  "name": "surveyjs_react_quickstart_new",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "bootstrap": "^3.3.7",
    "jquery": "^3.3.1",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-router-dom": "^5.2.0",
    "react-scripts": "4.0.3",
    "survey-analytics": "latest",
    "survey-creator": "latest",
    "survey-pdf": "latest",
    "survey-react": "latest",
    "surveyjs-widgets": "latest",
    "xlsx": "^0.16.9",
    "jspdf": "1.5.3",
    "jspdf-autotable": "3.0.5"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts --max_old_space_size=4096 build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ]
}
kamal-choudhary commented 2 years ago

I was facing the exact same error. And the solution suggested by @easyrun32 helped me to fix it.

andrewtelnov commented 2 years ago

I have update package.json

Thank you, Andrew