Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix React app build error #74

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

yunchae-kim
Copy link
Contributor

[#73] Refer to GitHub issue...

This update fixes the React app build error that happens when running rpm run build in ‘app’.
The update includes these changes:

  • Fixed the issue where ESLint was not being properly applied to app directory due to directory reference error. This was resolved by creating .eslintrc file in ‘web’ directory and installing ESLint as dev dependency in ‘app’.
  • Fixed the package dependency conflicts of ‘app’ by updating packages to latest version compatible with React 17.
  • Fixed the issue where React build would not run due to React version conflict between eslint-plugin-react and react-script. This was resolved by creating .env file that allowed ignoring ESLint while running React script.
  • Updated package.json, package-lock.json of ‘root’, ‘web’, ‘app’, and ‘api’. package-lock.json for ‘app’ and ‘api’ were deleted as they were not necessary.
  • Minor fix in .vscode/settings.json to fix regex errors.
  • Minor fix in app/public/index.html to fix regex errors based on ESLint.

Fixes #73

This update fixes the React app build error that happens when running
rpm run build in ‘app’.
The update includes these changes:
- Fixed the issue where ESLint was not being properly applied to app
directory due to directory reference error. This was resolved by
creating .eslintrc file in ‘web’ directory and installing ESLint as dev
dependency in ‘app’.
- Fixed the package dependency conflicts of ‘app’ by updating packages
to latest version compatible with React 17.
- Fixed the issue where React build would not run due to React version
conflict between eslint-plugin-react and react-script. This was resolved
by creating .env file that allowed ignoring ESLint while running React
script.
- Updated package.json, package-lock.json of ‘root’, ‘web’, ‘app’, and
‘api’. package-lock.json for ‘app’ and ‘api’ were deleted as they were
not necessary.
- Minor fix in .vscode/settings.json to fix regex errors.
- Minor fix in app/public/index.html to fix regex errors based on
ESLint.

Fixes #73
@yunchae-kim yunchae-kim linked an issue Sep 14, 2023 that may be closed by this pull request
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-node": "^4.1.0",
Copy link
Contributor Author

@yunchae-kim yunchae-kim Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eslint-config-node deleted as now not needed.

Comment on lines -40 to 54
"type" : "rule",
"selector" : /^&/
"type": "rule",
"selector": "^&"
},
{
"type" : "rule",
"selector" : /^&:\w+$/
"type": "rule",
"selector": "^&:\\w+$"
},
{
"type" : "rule",
"selector" : /^&: : \w+$/
"type": "rule",
"selector": "^&: : \\w+$"
},
{
"type" : "at-rule",
"name" : "media"
"type": "at-rule",
"name": "media"
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regex fix.

@@ -53,10 +53,8 @@
"import/prefer-default-export": ["warn", { "target": "any" }],
"import/no-duplicates": ["error", { "considerQueryString": true }],
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted simple-import-sort/exports as it is not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved eslintignore to web to make it work properly.

Comment on lines -32 to -34
"eslintConfig": {
"extends": "react-app"
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted as it conflicts with eslint setup in root.

"@testing-library/jest-dom": "^6.1.3",
"@testing-library/react": "^12.0.0",
"@testing-library/user-event": "^12.0.0",
"eslint": "^8.49.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added to let eslint rule referenced properly in web directory.

@@ -23,7 +21,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>ComptoxAI &ndash; Interactive data portal</title>
<title>ComptoxAI Interactive data portal</title>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor regex change

@yunchae-kim yunchae-kim merged commit e63b413 into master Sep 14, 2023
6 checks passed
@yunchae-kim yunchae-kim deleted the fix/issue-73/fix-react-app-build-error branch September 14, 2023 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix React app build error
1 participant