-
Notifications
You must be signed in to change notification settings - Fork 43
docs: update installation guide for React–backend integration #238
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
base: installation-doc
Are you sure you want to change the base?
docs: update installation guide for React–backend integration #238
Conversation
Signed-off-by: Nikhil-Shinde7 <[email protected]>
882c98c to
73b0c1d
Compare
| ```bash | ||
| sudo apt-get update | ||
| sudo apt-get install -y python3 python3-pip gcc git python3-dev libssl-dev libffi-dev cron python3-lxml apache2 libapache2-mod-wsgi-py3 | ||
| sudo pip3 install cffi cryptography Flask launchpadlib simplejson requests pytest |
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.
With this command on Ubuntu 24.04, I get an error:
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. If you wish to install a non-Debian packaged Python application, it may be easiest to use pipx install xyz, which will manage a virtual environment for you. Make sure you have pipx installed. See /usr/share/doc/python3.12/README.venv for more information.note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
How did you work around this?
Following the suggestion from this error message, I used these packages instead installed via apt:
python3-cffi python3-cryptography python3-flask python3-launchpadlib python3-simplejson python3-requests python3-pytest
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.
I also needed:
python3-flask-cors python3-dotenv
| ```bash | ||
| sudo -u apache ./bin/package_build.py RHEL_8_Package_List.json | ||
| ``` | ||
|
|
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.
Let's update below this line to mention the src/config/supported_distros.py.example file, text with something like:
Copy src/config/supported_distros.py.example to src/config/supported_distros.py to tell SDT where to find the sources:
sudo -u apache cp src/config/supported_distros.py.example src/config/supported_distros.pyAnd then continue to the section that says "The src/config/supported_distros.py must now be updated to reflect..." since I believe all of that is fine.
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash | ||
| \. "$HOME/.nvm/nvm.sh" | ||
| nvm install 22 | ||
| node -v # Should print "v22.20.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.
It gives me: v22.21.0
| \. "$HOME/.nvm/nvm.sh" | ||
| nvm install 22 | ||
| node -v # Should print "v22.20.0". | ||
| npm -v # Should print "10.9.3". |
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.
This one gives me 10.9.4
|
|
||
| sudo apt install npm | ||
|
|
||
| ```bash |
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.
First question, did you have a problem with the npm package installed via apt? That's preferred over grabbing a static install script for maintainability and security, but if that wasn't working, it would be great to know what the problem was.
That said, running the following as-is installs npm as your regular user, so the apache user doesn't have access to run npm install later, I just get "command not found"
How did you get it so you could run npm install?
| sudo npm i | ||
|
|
||
| ```bash | ||
| npm install |
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.
As noted above, I tried a few things, but I didn't succeed in getting this running. There was either no access to the npm binary, or permissions issue (run as my user), or it wouldn't work (when I used the Ubuntu package).
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.
Good news! I was finally able to get this going using the package from Ubuntu (sudo apt install npm) and by running:
sudo -u apache npm install
sudo -u apache npm run startAnd navigated to http://IP_ADDRESS:3000/
No description provided.