surveyjs_react_quickstart
surveyjs_react_quickstart copied to clipboard
npm build doesn't work
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
Same problem here.
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"
]
}
I was facing the exact same error. And the solution suggested by @easyrun32 helped me to fix it.
I have update package.json
Thank you, Andrew