# Help Needed module\_not\_found

**URL:** <https://discourse.nodered.org/t/help-needed-module-not-found/56209>\
**Category:** General\
**Tags:** home-assistant\
**Created:** [6 January 2022 16:23 UTC](https://discourse.nodered.org/t/help-needed-module-not-found/56209 "2022-01-06T16:23:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bplatypus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bplatypus/32/16434_2.png) [@bplatypus](https://discourse.nodered.org/u/bplatypus)\
**Post date:** [6 January 2022 16:23 UTC](https://discourse.nodered.org/t/help-needed-module-not-found/56209/1 "2022-01-06T16:23:58Z")

</div>

Hi!

I don't know how I lost the worst possible module in node-red 😰 : node-red-contrib-home-assistant-websocket.

I'm running node-red on docker but I initially created it through the synology interface of docker and wanted to use a docker-compose instead of using the interface. I did a backup of the 'data' folder... so I thought, easy, just stop/delete the container from the interface and then re-create it with docker-compose (pointing to the same 'data' folder as before) but when I restarted it ONE (and only one?) module was not found anymore (the home-assistant-websocket... which I'm using for almost everything 😭 ).

I really hope someone can help me restore that because I would lose 2+ days of configuration 😱 .

When I start node-red, I can see the following message:

```auto
nodered | 6 Jan 16:59:00 - [warn] ------------------------------------------------------
nodered | 6 Jan 16:59:00 - [warn] [node-red-contrib-home-assistant-websocket/all] Error: Cannot find module './lib/websocket'
nodered | Require stack:
nodered | - /data/node_modules/ws/index.js
nodered | - /data/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/createSocket.js
nodered | - /data/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js
nodered | - /data/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/index.js
nodered | - /data/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/config-server/controller.js
nodered | - /data/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/config-server/index.js
nodered | - /data/node_modules/node-red-contrib-home-assistant-websocket/dist/index.js
nodered | - /usr/src/node-red/node_modules/@node-red/registry/lib/loader.js
nodered | - /usr/src/node-red/node_modules/@node-red/registry/lib/index.js
nodered | - /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
nodered | - /usr/src/node-red/node_modules/@node-red/runtime/lib/index.js
nodered | - /usr/src/node-red/node_modules/node-red/lib/red.js
nodered | - /usr/src/node-red/node_modules/node-red/red.js
nodered | 6 Jan 16:59:00 - [warn] ------------------------------------------------------
nodered | 6 Jan 16:59:00 - [info] Settings file : /data/settings.js
nodered | 6 Jan 16:59:00 - [info] Context store : 'default' [module=memory]
nodered | 6 Jan 16:59:00 - [info] User directory : /data
nodered | 6 Jan 16:59:00 - [warn] Projects disabled : editorTheme.projects.enabled=false
nodered | 6 Jan 16:59:00 - [info] Flows file : /data/flows.json
nodered | 6 Jan 16:59:00 - [warn]
nodered |
nodered | ---------------------------------------------------------------------
nodered | Your flow credentials file is encrypted using a system-generated key.
nodered |
nodered | If the system-generated key is lost for any reason, your credentials
nodered | file will not be recoverable, you will have to delete it and re-enter
nodered | your credentials.
nodered |
nodered | You should set your own key using the 'credentialSecret' option in
nodered | your settings file. Node-RED will then re-encrypt your credentials
nodered | file using your chosen key the next time you deploy a change.
nodered | ---------------------------------------------------------------------
nodered |
nodered | 6 Jan 16:59:00 - [info] Waiting for missing types to be registered:
nodered | 6 Jan 16:59:00 - [info] - server
nodered | 6 Jan 16:59:00 - [info] - api-call-service
nodered | 6 Jan 16:59:00 - [info] - ha-zone
nodered | 6 Jan 16:59:00 - [info] - server-state-changed
nodered | 6 Jan 16:59:00 - [info] - ha-entity
nodered | 6 Jan 16:59:00 - [info] - api-current-state
nodered | 6 Jan 16:59:00 - [info] - server-events
nodered | 6 Jan 16:59:00 - [info] Server now running at http://127.0.0.1:1880/

```

I checked in the backup folder but cannot see this 'websocket' folder??

Thanks for any help!

---

<div class="post-metadata">

**Author:** ![bplatypus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bplatypus/32/16434_2.png) [@bplatypus](https://discourse.nodered.org/u/bplatypus)\
**Post date:** [6 January 2022 18:07 UTC](https://discourse.nodered.org/t/help-needed-module-not-found/56209/2 "2022-01-06T18:07:29Z")

</div>

Holy crap, I was finally able to recover it... not sure what was missing but here is what I did:

1. Created an empty node-red container
2. Added the node-red-contrib-home-assistant-websocket module
3. Created some basic flow/nodes which is using the module (not sure this is required)
4. Deploy changes
5. docker-compose down
6. Copied all content of the node\_modules folder to the nodes\_modules folder of the container which was not working
7. docker-compose up on my 'real' container
8. Grab a beer and enjoy it 😍

So happy right now 😆

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [20 January 2022 18:08 UTC](https://discourse.nodered.org/t/help-needed-module-not-found/56209/3 "2022-01-20T18:08:02Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
