Node red won't start

I have been using Node Red without issues for the past year. All of a sudden Node Red wont start and I get 502 bad gateway message.

I believe this is due to a bug with Huemagic, which I no longer use. How can I remove the palette when I can’t start Node Red?

Welcome to Node-RED
===================
2 Dec 23:05:50 - [info] Node-RED version: v2.1.4
2 Dec 23:05:50 - [info] Node.js  version: v16.13.1
2 Dec 23:05:50 - [info] Linux 5.10.75 x64 LE
2 Dec 23:05:51 - [info] Loading palette nodes
2 Dec 23:05:53 - [info] Dashboard version 3.1.2 started at /endpoint/ui
Traceback (most recent call last):
  File "/opt/node_modules/node-red-node-pi-gpio/testgpio.py", line 3, in <module>
    import RPi.GPIO as GPIO
  File "/usr/lib/python3.9/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
2 Dec 23:05:54 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
2 Dec 23:05:54 - [info] Settings file  : /etc/node-red/config.js
2 Dec 23:05:54 - [info] Context store  : 'default' [module=memory]
2 Dec 23:05:54 - [info] User directory : /config/node-red/
2 Dec 23:05:54 - [warn] Projects disabled : editorTheme.projects.enabled=false
2 Dec 23:05:54 - [info] Flows file     : /config/node-red/flows.json
2 Dec 23:05:54 - [info] Server now running at http://127.0.0.1:46836/
2 Dec 23:05:54 - [info] Starting flows
2 Dec 23:05:55 - [info] Started flows
2 Dec 23:05:55 - [info] [mqtt-broker:4238db6e.227ed4] Connected to broker: mqtt-user@mqtt://192.168.1.12:1883
2 Dec 23:05:55 - [red] Uncaught Exception:
2 Dec 23:05:55 - [error] Error: Philips Hue: 1, unauthorized user
    at /config/node-red/node_modules/huejay/lib/Transport.js:88:17
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Fixed. I reverted to a previous backup and removed Huemagic

I am having the very same problem. I am not using anything related to raspberry-pi GPIO, how you guessed how to fix it? Is Huemagic a node-red library? Another addon?

I looked at the error at the end of the log where it says

2 Dec 23:05:55 - [error] Error: Philips Hue: 1, unauthorized user
at /config/node-red/node_modules/huejay/lib/Transport.js:88:17
at processTicksAndRejections (node:internal/process/task_queues:96:5)’

I would suggest looking in the Node Red log for the first error it throws.