Shinobi installation on Raspberry Pi 2W Zero stalls during NPM setup

Hey everyone, I’m having trouble setting up Shinobi on my Raspberry Pi 2W Zero. I’m using a 32GB SD card and tried both the main and dev branches.

The problem is that the installation keeps freezing at the same point every time. It’s during the NPM libraries setup. I’ve left it running overnight, but there’s no progress at all.

Has anyone else run into this issue? I’m not sure what to do next. Maybe there’s a compatibility problem with the Pi 2W Zero? Or could it be something to do with the SD card?

I’d really appreciate any tips or suggestions on how to get past this roadblock. Thanks in advance for your help!

hey, i had same issue with my pi zero. the npm install is super slow on these lil guys. what helped me was increasin swap space. edit /etc/dphys-swapfile, set CONF_SWAPSIZE=1024, then sudo dphys-swapfile setup && sudo dphys-swapfile swapon. takes ages but it should finish eventually. good luck!

I’ve gone through a similar ordeal with Shinobi on a Pi Zero W, and it can be frustrating. In my experience, the NPM setup is quite resource-intensive, which can be a real challenge for the Pi Zero’s limited hardware.

What worked for me was using a powered USB hub and connecting an external SSD instead of relying on the SD card. This significantly improved the installation process. Also, make sure you’re using a good quality power supply rated at least 2.5A.

If that’s not an option, you might want to consider pre-compiling the Node modules on a more powerful machine and then transferring them to the Pi. It’s a bit of a workaround, but it saved me hours of waiting.

Lastly, double-check your Pi’s temperature during the install. If it’s overheating, it might be throttling performance. A small heatsink can make a big difference.

Hope this helps you get Shinobi up and running!

I’ve encountered this issue before when installing Shinobi on resource-constrained devices. The NPM setup can indeed be a bottleneck. One approach that worked for me was to use a cross-compilation method. Essentially, I set up a Docker container on my more powerful desktop machine that mimicked the Pi’s environment, compiled everything there, and then transferred the pre-built modules to the Pi. This significantly reduced the strain on the Pi during installation.

Another trick is to break down the npm install process into smaller chunks. Instead of running a full npm install, try installing dependencies in batches. This can help prevent timeouts and allows you to resume from where you left off if something goes wrong.

Lastly, ensure you’re running the latest version of Node.js compatible with your Pi model. Older versions can sometimes struggle with newer package requirements.