surveyjs_react_quickstart icon indicating copy to clipboard operation
surveyjs_react_quickstart copied to clipboard

npm build doesn't work

Open sokoow opened this issue 4 years ago • 4 comments

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

sokoow avatar Dec 04 '20 12:12 sokoow

Same problem here.

fredrodriguesof avatar Mar 25 '21 12:03 fredrodriguesof

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

easyrun32 avatar Aug 23 '21 17:08 easyrun32

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

kamal-choudhary avatar Dec 04 '21 09:12 kamal-choudhary

I have update package.json

Thank you, Andrew

andrewtelnov avatar Dec 04 '21 14:12 andrewtelnov