PiWebRadio Project - stuck at "npm install" step

93 views Asked by At

I am building a small internet radio project with a raspberry pi Zero W from this project by Kevin Castejon. Unfortunately I'm stuck at the "npm install" step. Error message below.

Can you help me please ? I waited for hours but nothing happened. It stays stuck there. What to do ?

error screenshot

I tried the suggested command (npx browserlist@latest --update-db) but it didn't work.

EDIT 19/01/2024

Thank you Chrisbyte for your help. The complete project can be found at this address: HERE

On the main lines :

  1. Installing Raspberry OS lite on RPi Zero W

  2. WIFI and SSH enablement

  3. sudo apt-get update && sudo apt-get upgrade -y

  4. sudo raspi-config: Interfacing options > I2C > Yes

  5. Installation of NodeJs: Author's note: "This section will tell you how to install NodeJs on your Raspberry Pi Zero W. It's heavily inspired by this blog post.

On the Raspberry Pi Zero W, Node.js was nowhere to be found in apt-get and the scripts that used NodeSource in the official install documentation didn’t work because ARMv6l is no longer supported by NodeSource.

We're going to download a binary from the official Node.js website and manually install it on our Raspberry Pi Zero W. On this section, we'll use the 10LTS version of Node.js, but this guide should still work for other versions. You can find a list of distributions here https://nodejs.org/dist/. When you find the version you'd like to install, you're looking for the armv6l architecture. For example: https://nodejs.org/dist/v10.22.0/node-v10.22.0-linux-armv6l.tar.gz"

  1. curl -o node-v10.22.0-linux-armv6l.tar.gz https://nodejs.org/dist/v10.22.0/node-v10.22.0-linux-armv6l.tar.gz

  2. tar -xzf node-v10.22.0-linux-armv6l.tar.gz

  3. sudo cp -r node-v10.22.0-linux-armv6l/* /usr/local/

  4. node -v

  5. PiWeb Radio Installation: Git page link below in comment

  6. git clone https://github.com/kevincastejon/js-raspberrypi-piwebradio-webapp.git

  7. cd js-raspberrypi-piwebradio-webapp

  8. npm install

This is where the process gets stuck: "Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db

Then by canceling with Ctrl+C then sending the command proposed above, I obtain this:

"npx: installed 7 in 36.956s The --update-db command is deprecated. Please use npx update-browserslist-db@latest instead. Browserslist DB update will still be done. No lockfile found. Run "npm install", "yarn install" or "pnpm install"

Then if I run: "npx update-browserslist-db@latest", I get this:

"npx: installed 3 in 21.317s Update npm or call npx update-browserslist-db@latest"

It's the snake that bites its own tail...

1

There are 1 answers

0
Kevin Castejon On BEST ANSWER

This issue should be fixed with the latest commit, just be sure that the following directories ARE NOT PRESENT on the raspi (as previous failed installs may have let garbage behind)

  • WiringPi
  • py-gaugette
  • py-spidev

Just delete them if they are here and restart the install process

If you're not sure just restart the whole process (nowadays you can use the RaspberryPi Imager software instead of the first steps)