surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.18k stars 808 forks source link

Can't build and deploy with React #6553

Open abastt opened 1 year ago

abastt commented 1 year ago

Hi. I am using yarn build and it gives me an error:

yarn build: Failed to compile. ./node_modules/survey-core/defaultV2.min.css ParserError: Syntax Error at line: 1, column 27

package.json: "survey-react-ui": "^1.9.87",

yarn.lock: "survey-core@1.9.87": "integrity" "sha512-/Dvtw10ASxjtBG9ORdlxQdLVtGOA3uP0H2YhKsLDQpwnU5vYyCiUi+WogZUdQIP8vQL6rZiKPVRRF3t4tK6wSQ==" "resolved" "https://registry.npmjs.org/survey-core/-/survey-core-1.9.87.tgz" "version" "1.9.87"

"survey-react-ui@^1.9.87": "integrity" "sha512-703Jk9NJK6/K7esMolv0Wo4oq10y7WRnFW5JyoOx22xkL6COE9hC2gK8Zmms+NTQfJyqxyFKLX8jRDHxWqN7Pg==" "resolved" "https://registry.npmjs.org/survey-react-ui/-/survey-react-ui-1.9.87.tgz" "version" "1.9.87" dependencies: "react" "^16.5.0 || ^17.0.1 || ^18.1.0" "react-dom" "^16.5.0 || ^17.0.1 || ^18.1.0" "survey-core" "1.9.87"

tsv2013 commented 1 year ago

What is the error you've got during compilation? How can we reproduce the issue? What versions of NodeJS and NPM are you using?

abastt commented 1 year ago

The error is: node_modules/survey-core/defaultV2.min.css ParserError: Syntax Error at line: 1, column 27

The error gives when i do yarn build. I don't use npm, I use yarn. The version of yarn is 1.22.19 and the version of node is 16.17.1

tsv2013 commented 1 year ago

Can you share the text of the error? Or a small project to reproduce the issue.

abastt commented 1 year ago

I share a section of the console, on the end the error. Is this useful to you?

[2023-07-20 02:31:59] │ Installing node_modules using yarn (from yarn.lock) [2023-07-20 02:32:00] │ Running yarn install [2023-07-20 02:32:00] │ [2023-07-20 02:32:00] │ yarn install v1.22.19 [2023-07-20 02:32:00] │ warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [2023-07-20 02:32:00] │ [1/4] Resolving packages... [2023-07-20 02:32:00] │ [2/4] Fetching packages... [2023-07-20 02:32:46] │ [3/4] Linking dependencies... [2023-07-20 02:32:46] │ warning "@emotion/react > @emotion/babel-plugin@11.10.5" has unmet peer dependency "@babel/core@^7.0.0". [2023-07-20 02:32:46] │ warning "@emotion/react > @emotion/babel-plugin > @babel/plugin-syntax-jsx@7.18.6" has unmet peer dependency "@babel/core@^7.0.0-0". [2023-07-20 02:32:46] │ warning " > @mui/x-data-grid@5.17.19" has unmet peer dependency "@mui/system@^5.4.1". [2023-07-20 02:32:46] │ warning " > @testing-library/user-event@12.8.3" has unmet peer dependency "@testing-library/dom@>=7.21.4". [2023-07-20 02:32:46] │ warning " > react-drag-drop-files@2.3.8" has incorrect peer dependency "react@^18.0.0". [2023-07-20 02:32:46] │ warning " > react-drag-drop-files@2.3.8" has incorrect peer dependency "react-dom@^18.0.0". [2023-07-20 02:32:46] │ warning "react-drag-drop-files > styled-components@5.3.6" has unmet peer dependency "react-is@>= 16.8.0". [2023-07-20 02:32:46] │ warning "react-scripts > @svgr/webpack > @babel/preset-env > @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.20.7" has incorrect peer dependency "@babel/core@^7.13.0". [2023-07-20 02:32:46] │ warning "react-spring > @react-spring/konva@9.6.1" has unmet peer dependency "konva@>=2.6". [2023-07-20 02:32:46] │ warning "react-spring > @react-spring/konva@9.6.1" has unmet peer dependency "react-konva@^16.8.0 || ^17.0.0". [2023-07-20 02:32:46] │ warning "react-spring > @react-spring/native@9.6.1" has unmet peer dependency "react-native@>=0.58". [2023-07-20 02:32:46] │ warning "react-spring > @react-spring/three@9.6.1" has unmet peer dependency "@react-three/fiber@>=6.0". [2023-07-20 02:32:46] │ warning "react-spring > @react-spring/three@9.6.1" has unmet peer dependency "three@>=0.126". [2023-07-20 02:32:46] │ warning "react-spring > @react-spring/zdog@9.6.1" has unmet peer dependency "react-zdog@>=1.0". [2023-07-20 02:32:46] │ warning "react-spring > @react-spring/zdog@9.6.1" has unmet peer dependency "zdog@>=1.0". [2023-07-20 02:32:46] │ warning " > stylis-plugin-rtl@2.1.1" has unmet peer dependency "stylis@4.x". [2023-07-20 02:33:20] │ [4/4] Building fresh packages... [2023-07-20 02:33:21] │ Done in 81.20s. [2023-07-20 02:33:21] │ [2023-07-20 02:33:26] │ Running custom build command: yarn build [2023-07-20 02:33:26] │ yarn run v1.22.19 [2023-07-20 02:33:26] │ $ react-scripts build [2023-07-20 02:33:28] │ Creating an optimized production build... [2023-07-20 02:33:28] │ Browserslist: caniuse-lite is outdated. Please run: [2023-07-20 02:33:28] │ npx update-browserslist-db@latest [2023-07-20 02:33:28] │ Why you should do it regularly: https://github.com/browserslist/update-db#readme [2023-07-20 02:35:32] │ Failed to compile. [2023-07-20 02:35:32] │ [2023-07-20 02:35:32] │ ./node_modules/survey-core/defaultV2.min.css [2023-07-20 02:35:32] │ ParserError: Syntax Error at line: 1, column 27 [2023-07-20 02:35:32] │ [2023-07-20 02:35:32] │ [2023-07-20 02:35:32] │ error Command failed with exit code 1. [2023-07-20 02:35:32] │ info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. [2023-07-20 02:35:32] │ building: exit status 1 [2023-07-20 02:35:32] │ ERROR: failed to build: exit status 1 [2023-07-20 02:35:33] │ [2023-07-20 02:35:33] │ [2023-07-20 02:35:33] │ For documentation on the buildpacks used to build your app, please see: [2023-07-20 02:35:33] │ [2023-07-20 02:35:33] │ Node.js v0.3.6 https://do.co/apps-buildpack-node [2023-07-20 02:35:33] │ [2023-07-20 02:35:33] │ ✘ build failed

tsv2013 commented 1 year ago

Thank you for sharing the log. Unfortunately is doesn't shows the exact compilation error. Are you using Node.js v0.3.6 ?

abastt commented 1 year ago

No. We using version 16.x. We use Node.js Cloud Native Buildpack. The buildpack use by default version 16.x. 0.3.6 is a the version of the Node.js Cloud Native Buildpack

tsv2013 commented 1 year ago

Can you share the steps of how did you create this app? I mean the cli tool (CRA or similar). Or could you share a repo link or a zip with minimal project illustrating the issue?