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

"quick fix"-included. pi zero W setup error for node #346

Open
dylanpoll opened this issue May 7, 2020 · 0 comments
Open

"quick fix"-included. pi zero W setup error for node #346

dylanpoll opened this issue May 7, 2020 · 0 comments

Comments

@dylanpoll
Copy link

dylanpoll commented May 7, 2020

I am posting this here in case someone else is trying to do this... and I am still learning github X/

well, its a "quick fix", and I am sure there are bugs with doing things in this ultra lazy fashion but....
I made a shell script that does this, you can just do it line by line tho.

#!/bin/bash
cd
wget https://nodejs.org/dist/v11.15.0/node-v11.15.0-linux-armv6l.tar.xz
tar -xvf node-v11.15.0-linux-armv6l.tar.gz.tar.xz
cd node-v11.15.0-linux-armv6l
sudo cp -R * /usr/local/
git clone git://github.com/adafruit/Adafruit-WebIDE.git
cd Adafruit-WebIDE
mkdir tmp
npm config set tmp tmp
npm install
editor config/config.js
echo "to change ownership of the webIDE directory to allow a non root user to cast node server.js write :sudo chown -R username directory"
echo "to run the server as a background process type: sudo nohup node server.js &"
echo "to run it in this terminal type: sudo node server.js"
echo "the directory where you will want to run the command will be"
DIRECTORY=$(pwd)
echo $DIRECTORY

quick notes:
might want to change the ports or other config stuff if your doing this, thats why i left the edit config line in there....
i have been suggested to not use sudo so casually in shell scripts, but if you don't run node here as sudo you wont have permissions, you can grant yourself those with chmod... but im lazy.

most current version of node supported for armv6 is 11.15.0
https://nodejs.org/dist/v11.15.0/

I tried installing the newer node packages like the arm7l.tar.xz, but it failed

I did post this as a script on my github, so if you just want to run it as it is... just run this BUT MAKE SURE TO READ the link because you shouldn't trust some random stranger. linke to git page
https://github.com/dylanpoll/ShellScript/blob/master/pi0WwebIDE/installWebIDE.sh

wget -O - https://raw.githubusercontent.com/dylanpoll/ShellScript/master/pi0WwebIDE/installWebIDE.sh | bash

credit to:
https://raspberry-valley.azurewebsites.net/Adafruit-webIDE/
https://warlord0blog.wordpress.com/2018/06/27/node-js-v8-on-raspberry-pi-zero/
(and you guys who run this project)

thank you guys.

(in the future I'll go through this more step by step and see if i can do a manual install with better optimizations for the limited memory and processing power on the zero)

IF YOU SSH IN: keep in mind that if you don't use "nohup" and end with the "&" symbol the process will end when you disconnect. there are a few ways around it, but nohup is easy. press any key after that and terminal will resume like normal. you can do this if your already running it and want to exit your SSH steam.

ctrl+z
bg
disown

it pauses the process, sends it to the background and disowns it so it stays running.

@dylanpoll dylanpoll changed the title "quick fix"-included pi zero W setup "quick fix"-included. pi zero W setup error for node May 7, 2020
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

No branches or pull requests

1 participant