-
Notifications
You must be signed in to change notification settings - Fork 0
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
Improve Frontend Makefile run command and Backend setup #50
Conversation
Failing Scenario: If the user has nvm installed but hasn't installed Node.js version 22.8.0 through setup.sh and prefers to use their current version. Questions:
Exploration:
|
Also, if we can have |
- If nvm is installed - If reqired version is installed with nvm; use that - If required version is not present, then check versions above minimum node version; use that - If no version is found, install the required version with nvm and use that - If nvm is not installed - Use user's default node version :
Updated the makefile run command to run the following logic, Two node version are mentioned in the script :
Updated Logic
|
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.
All 3 cases are working.
- Required version is available (use it)
> min required version
is available (use it)< min required version
is available (install required version and use it)
Note: If nvm is installed it will have atleast one version so there won't be a case for no version is installed.
I think 3rd case might be super rare but it is good that it is covered.
There can be one more possibility in case 3, that npm install is not done. In that case user will get error vite: not found
and they should be able to take care of installation.
Let's merge it after updating the title.
Pull Request Summary
This PR introduces improvements to both the Frontend Makefile run command and Backend Setup to enhance usability, flexibility, and ensure compatibility with project requirements.
1. Frontend Makefile:
make run-fe
Command EnhancementsThe
make run-fe
command logic has been updated to provide users with greater flexibility regarding Node.js versions, particularly when usingnvm
.Logic Updates:
When
nvm
is installed:NODE_VERSION
(the LTS Node version set insetup.sh
) is installed vianvm
, use that version.NODE_VERSION
is not installed but a version is available that exceedsMIN_NODE_VERSION
(the minimum Node version supported by this project), use that compatible version.NODE_VERSION
vianvm
and use it.When
nvm
is not installed:2. Backend Setup Enhancement
setup.sh
script now includes an update forpip
to ensure the latest version is installed, improving compatibility and security for Python package installations.