# Node red fails to start

**URL:** <https://discourse.nodered.org/t/node-red-fails-to-start/19858>\
**Category:** General\
**Created:** [3 January 2020 11:58 UTC](https://discourse.nodered.org/t/node-red-fails-to-start/19858 "2020-01-03T11:58:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nat](https://avatars.discourse-cdn.com/v4/letter/n/8c91f0/32.png) [@nat](https://discourse.nodered.org/u/nat)\
**Post date:** [3 January 2020 11:58 UTC](https://discourse.nodered.org/t/node-red-fails-to-start/19858/1 "2020-01-03T11:58:25Z")

</div>

Hi,

After Installing libbluetooth-dev (npm install -g node-red-contrib-noble), and  
Bluez (npm install node-red-contrib-generic-ble)

Node-red will no longer start. I have tried removeing them via, 'npm remove node-red-contrib-generic-ble' and 'npm remove node-red-contrib-nobel' but neither have been successful.

is there anyway I can recover Node-red to get it to run again??

Below is the error message:-

Your environment has been set up for using Node.js 10.16.3 (x64) and npm.

C:\Windows\System32\>node-red  
3 Jan 11:18:31 - [info]

# Welcome to Node-RED

3 Jan 11:18:31 - [info] Node-RED version: v1.0.0  
3 Jan 11:18:31 - [info] Node.js version: v10.16.3  
3 Jan 11:18:31 - [info] Windows\_NT 10.0.17134 x64 LE  
3 Jan 11:18:32 - [info] Loading palette nodes  
Failed to initialize libusb.  
3 Jan 11:18:34 - [info] Settings file : \Users\H163857.node-red\settings.js  
3 Jan 11:18:34 - [info] Context store : 'default' [module=memory]  
3 Jan 11:18:34 - [info] User directory : \Users\H163857.node-red  
3 Jan 11:18:34 - [warn] Projects disabled : editorTheme.projects.enabled=false  
3 Jan 11:18:34 - [info] Flows file : \Users\H163857.node-red\flows\_UK7NLT32526H2.json  
3 Jan 11:18:34 - [warn]

* * *

Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials  
file will not be recoverable, you will have to delete it and re-enter  
your credentials.

## You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change.

3 Jan 11:18:34 - [info] [GenericBLE] Start BLE scanning  
3 Jan 11:18:34 - [info] Starting flows  
3 Jan 11:18:34 - [info] [mosca in:c90e9ce9.df0f5] Binding mosca mqtt server on port: 1883  
3 Jan 11:18:34 - [info] [GenericBLE] Start BLE scanning  
3 Jan 11:18:34 - [info] Started flows  
3 Jan 11:18:34 - [red] Uncaught Exception:  
3 Jan 11:18:34 - Error: No compatible USB Bluetooth 4.0 device found!  
at BluetoothHciSocket.bindUser (C:\Users\H163857.node-red\node\_modules@abandonware\bluetooth-hci-socket\lib\usb.js:87:11)  
at BluetoothHciSocket.bindRaw (C:\Users\H163857.node-red\node\_modules@abandonware\bluetooth-hci-socket\lib\usb.js:43:8)  
at Hci.init (C:\Users\H163857.node-red\node\_modules@abandonware\noble\lib\hci-socket\hci.js:101:35)  
at NobleBindings.init (C:\Users\H163857.node-red\node\_modules@abandonware\noble\lib\hci-socket\bindings.js:82:13)  
at Noble. (C:\Users\H163857.node-red\node\_modules@abandonware\noble\lib\noble.js:57:24)  
at process.\_tickCallback (internal/process/next\_tick.js:61:11)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [3 January 2020 12:00 UTC](https://discourse.nodered.org/t/node-red-fails-to-start/19858/2 "2020-01-03T12:00:06Z")

</div>

Did you add a bluetooth node to the flow? Try starting in safe mode `node-red --safe` and remove any bluetooth nodes you added.

---

<div class="post-metadata">

**Author:** ![nat](https://avatars.discourse-cdn.com/v4/letter/n/8c91f0/32.png) [@nat](https://discourse.nodered.org/u/nat)\
**Post date:** [3 January 2020 12:37 UTC](https://discourse.nodered.org/t/node-red-fails-to-start/19858/3 "2020-01-03T12:37:08Z")

</div>

sounds like a good idea, but it doesn't want to start in safe mode either!

Output is below:-

Your environment has been set up for using Node.js 10.16.3 (x64) and npm.

C:\Users\H163857\>node-red --safe  
3 Jan 12:34:39 - [info]

# Welcome to Node-RED

3 Jan 12:34:39 - [info] Node-RED version: v1.0.0  
3 Jan 12:34:39 - [info] Node.js version: v10.16.3  
3 Jan 12:34:39 - [info] Windows\_NT 10.0.17134 x64 LE  
3 Jan 12:34:39 - [info] Loading palette nodes  
Failed to initialize libusb.  
3 Jan 12:34:41 - [info] Settings file : \Users\H163857.node-red\settings.js  
3 Jan 12:34:41 - [info] Context store : 'default' [module=memory]  
3 Jan 12:34:41 - [info] User directory : \Users\H163857.node-red  
3 Jan 12:34:41 - [warn] Projects disabled : editorTheme.projects.enabled=false  
3 Jan 12:34:41 - [info] Flows file : \Users\H163857.node-red\flows\_UK7NLT32526H2.json  
3 Jan 12:34:42 - [warn]

* * *

Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials  
file will not be recoverable, you will have to delete it and re-enter  
your credentials.

## You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change.

3 Jan 12:34:42 - [info] [GenericBLE] Start BLE scanning  
3 Jan 12:34:42 - [info] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
3 Jan 12:34:42 - [info] Flows stopped in safe mode. Deploy to start.  
3 Jan 12:34:42 - [info] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
3 Jan 12:34:42 - [info] [GenericBLE] Start BLE scanning  
3 Jan 12:34:42 - [red] Uncaught Exception:  
3 Jan 12:34:42 - Error: No compatible USB Bluetooth 4.0 device found!  
at BluetoothHciSocket.bindUser (C:\Users\H163857.node-red\node\_modules@abandonware\bluetooth-hci-socket\lib\usb.js:87:11)  
at BluetoothHciSocket.bindRaw (C:\Users\H163857.node-red\node\_modules@abandonware\bluetooth-hci-socket\lib\usb.js:43:8)  
at Hci.init (C:\Users\H163857.node-red\node\_modules@abandonware\noble\lib\hci-socket\hci.js:101:35)  
at NobleBindings.init (C:\Users\H163857.node-red\node\_modules@abandonware\noble\lib\hci-socket\bindings.js:82:13)  
at Noble. (C:\Users\H163857.node-red\node\_modules@abandonware\noble\lib\noble.js:57:24)  
at process.\_tickCallback (internal/process/next\_tick.js:61:11)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 January 2020 13:27 UTC](https://discourse.nodered.org/t/node-red-fails-to-start/19858/4 "2020-01-03T13:27:58Z")

</div>

Since the exception is in a file called usb.js it may be related to the earlier message `Failed to initialize libusb`. Why that should be happening though, I don't know.

---

<div class="post-metadata">

**Author:** ![filipejsbrandao](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/filipejsbrandao/32/21186_2.png) [@filipejsbrandao](https://discourse.nodered.org/u/filipejsbrandao)\
**Post date:** [4 May 2020 18:26 UTC](https://discourse.nodered.org/t/node-red-fails-to-start/19858/5 "2020-05-04T18:26:47Z")

</div>

@nat Did you find a way to solve your problem? I'm having the exact same issue.[Node-red not starting](https://discourse.nodered.org/t/node-red-not-starting/26029)

---

<div class="post-metadata">

**Author:** ![filipejsbrandao](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/filipejsbrandao/32/21186_2.png) [@filipejsbrandao](https://discourse.nodered.org/u/filipejsbrandao)\
**Post date:** [4 May 2020 18:32 UTC](https://discourse.nodered.org/t/node-red-fails-to-start/19858/6 "2020-05-04T18:32:37Z")

</div>

After running `npm remove node-red-contrib-generic-ble` I managed to start node-red. You can try the steps I followed also.

Best
