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

Bug fix: Install first the npm package #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hilarioaraujo
Copy link
Contributor

I was trying to install the Rpanion and I received a bug message in the npm installation. Then i discovered and fix. First it's needed to install the npm package with "apt install npm" then we have to install the react-scripts with the "npm install"

I was trying to install the Rpanion and I received a bug message in the npm installation. Then i discovered and fix.
First it's needed to install the npm package with "apt install npm" then we have to install the react-scripts with the "npm install"
@stephendade
Copy link
Owner

npm is installed here: https://github.com/stephendade/Rpanion-server/blob/master/deploy/RasPi2-3-4-deploy.sh#L34, as part of the nodejs package.

@tmarkson
Copy link
Contributor

tmarkson commented Aug 11, 2023

@hilarioaraujo what was the bug? what hardware are you using? what OS?

@hilarioaraujo
Copy link
Contributor Author

I am sorry for the late sir.

@hilarioaraujo
Copy link
Contributor Author

When I was trying install the Rpanion in Raspberry 4 with ubuntu 22.04 OS appear a error in the npm installation.

I opened the bash file of installation and appear that the npm method install is wrong, and i change it.

I change this:
npm install
NPM_INSTALL_EXIT_CODE=$?

to this:
sudo apt install -y npm
npm install
NPM_INSTALL_EXIT_CODE=$?

In this way, I was succeed in the installation.

@tmarkson
Copy link
Contributor

It's possible npm failed to install on the system during the nodejs install process; I've seen failures on boards other than Raspi that weren't handled.
But as @stephendade suggested, npm should be installed for the target user normally. If you install Rpanion again, I'd suggest checking the output of the log script to watch for failure around nodejs.

@lida2003
Copy link
Contributor

lida2003 commented Jan 20, 2024

@tmarkson Is it possible for the script to do more, such as:
a) detect if the binary or package has been installed, if installed then skip;
b) check if the bash execute successfully, if failed then stop and wait for further instruction;
c) as there might be some internet connect issues, then add loop trys ( I have seen the code in script, but it seems not work the way it designed to do so. well, maybe I'm wrong about that.)

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.

4 participants