-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
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
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-node": "^4.1.0", |
There was a problem hiding this comment.
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.
"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" | ||
} |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
"eslintConfig": { | ||
"extends": "react-app" | ||
}, |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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 – Interactive data portal</title> | |||
<title>ComptoxAI – Interactive data portal</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor regex change
[#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:
Fixes #73