# "Error: Cannot find module 'extend'

**URL:** <https://discourse.nodered.org/t/error-cannot-find-module-extend/54913>\
**Category:** General\
**Created:** [9 December 2021 08:21 UTC](https://discourse.nodered.org/t/error-cannot-find-module-extend/54913 "2021-12-09T08:21:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Omer](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@Omer](https://discourse.nodered.org/u/Omer)\
**Post date:** [9 December 2021 08:21 UTC](https://discourse.nodered.org/t/error-cannot-find-module-extend/54913/1 "2021-12-09T08:21:08Z")

</div>

Hi everyone,

I'm pretty new to Node-RED and I am working on a project with Augmented Operator Advisor by Schneider Electric to send MySQL data to the AOA app on a Tablet device. I followed up the installation of the AOA nodes (Unzip node-red-augmented-operator.zip in \node\_modules folder is all it says in the readme file), but whenever I try to deploy my flows or start up node-red I keep getting the same error message. Below you will find the cmd prompt after I start up node-RED. I have double checked and the files that are showing in the error message are all in their respective folders and when I check the palettes in Node-RED it is showing the node-red-augmentedoperator nodes in there. I think I am lacking a critical step in the installation of the module but I can't figure out what, sadly there's not more documentation I can rely on for the installation of this particular AOA module. I haven't installed anything through NPM. Thank you very much in advance.

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

C:\Users\omers>node-red
9 Dec 08:52:00 - [info]

Welcome to Node-RED
===================

9 Dec 08:52:00 - [info] Node-RED version: v2.1.4
9 Dec 08:52:00 - [info] Node.js version: v16.13.1
9 Dec 08:52:00 - [info] Windows_NT 10.0.19042 x64 LE
9 Dec 08:52:00 - [info] Loading palette nodes
9 Dec 08:52:01 - [info] Settings file : C:\Users\omers\.node-red\settings.js
9 Dec 08:52:01 - [info] Context store : 'default' [module=memory]
9 Dec 08:52:01 - [info] User directory : \Users\omers\.node-red
9 Dec 08:52:01 - [warn] Projects disabled : editorTheme.projects.enabled=false
9 Dec 08:52:01 - [info] Flows file : \Users\omers\.node-red\flows.json
9 Dec 08:52:01 - [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.
---------------------------------------------------------------------

9 Dec 08:52:01 - [info] Server now running at http://127.0.0.1:1880/
9 Dec 08:52:01 - [info] Starting flows
9 Dec 08:52:01 - [error] [Augmented-Operator-server:43072a22be5f998b] Error: Cannot find module 'extend'
Require stack:
- C:\Users\omers\.node-red\node_modules\node-red-augmented-operator\node_modules\request\index.js
- C:\Users\omers\.node-red\node_modules\node-red-augmented-operator\node-red-augmentedoperator.js
- C:\Users\omers\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\loader.js
- C:\Users\omers\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\registry\lib\index.js
- C:\Users\omers\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\nodes\index.js
- C:\Users\omers\AppData\Roaming\npm\node_modules\node-red\node_modules\@node-red\runtime\lib\index.js
- C:\Users\omers\AppData\Roaming\npm\node_modules\node-red\lib\red.js
- C:\Users\omers\AppData\Roaming\npm\node_modules\node-red\red.js
9 Dec 08:52:01 - [error] [mysql:Mysql localhost -testdb] MySQL database not configured
9 Dec 08:52:01 - [error] [mysql:Mysql localhost -testdb] MySQL database not configured
9 Dec 08:52:01 - [info] Started flows

```

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [9 December 2021 08:45 UTC](https://discourse.nodered.org/t/error-cannot-find-module-extend/54913/2 "2021-12-09T08:45:10Z")

</div>

Hi @Omer

Welcome to the forum.

That doesn't appear to be a node in the public Flow Library. Do you have a link to it anywhere?

Unzipping the module file is not a good way to install node modules. It won't get added to your package.json file and the module will be removed the next time you install anything with npm.

---

<div class="post-metadata">

**Author:** ![Omer](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@Omer](https://discourse.nodered.org/u/Omer)\
**Post date:** [9 December 2021 09:20 UTC](https://discourse.nodered.org/t/error-cannot-find-module-extend/54913/3 "2021-12-09T09:20:09Z")

</div>

Hiya,

Thank you very much for the swift reply!  
Here's the URL to the nodes [AOA Nodes](https://www.se.com/ww/en/download/document/AOANodes/)

I figured just unzipping it into the folder wouldnt be the right way/sufficient, but sadly that's all the readme file stated and since I'm pretty much a beginner I couldn't think of any other way.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [9 December 2021 09:25 UTC](https://discourse.nodered.org/t/error-cannot-find-module-extend/54913/4 "2021-12-09T09:25:38Z")

</div>

I would suggest installing it this way:

1. unzip node-red-augmented-operator.zip into a separate directory
2. in your `.node-red` directory, run `npm install <path to where you unzipped the file>`

That will install the module and ensure its dependencies are properly installed as well.

---

<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:** [9 December 2021 09:30 UTC](https://discourse.nodered.org/t/error-cannot-find-module-extend/54913/5 "2021-12-09T09:30:27Z")

</div>

After installing as @knolleary's suggestion, don't delete where you have unzipped it to, as node\_modules links to that folder.

You may be able to work around the missing module by going to your .node-red folder and running  
`npm install extend`  
Then restart node-red. Whether the node will work is another matter.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [9 December 2021 09:44 UTC](https://discourse.nodered.org/t/error-cannot-find-module-extend/54913/6 "2021-12-09T09:44:11Z")

</div>

> [@Colin](#):
>
> You may be able to work around the missing module by going to your .node-red folder and running  
> `npm install extend`  
> Then restart node-red. Whether the node will work is another matter.

No - that will cause npm to _remove_ node-red-augmented-operator because it hadn't been added to the package.json file.

---

<div class="post-metadata">

**Author:** ![Omer](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@Omer](https://discourse.nodered.org/u/Omer)\
**Post date:** [9 December 2021 09:51 UTC](https://discourse.nodered.org/t/error-cannot-find-module-extend/54913/7 "2021-12-09T09:51:39Z")

</div>

Thank you very much @knolleary it worked.  
You guys are awesome, I had been on this for a few days 🙂  
Have a nice rest of your week & stay healthy!

---

<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:** [9 December 2021 10:37 UTC](https://discourse.nodered.org/t/error-cannot-find-module-extend/54913/8 "2021-12-09T10:37:33Z")

</div>

> [@knolleary](#):
>
> that will cause npm to _remove_ node-red-augmented-operator because it hadn't been added to the package.json file.

I did say to do that _after_ installing the package as in your instructions.

---

<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:** [23 December 2021 10:38 UTC](https://discourse.nodered.org/t/error-cannot-find-module-extend/54913/9 "2021-12-23T10:38:18Z")

</div>

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