# Function Node gives an error (The workspace contains some unknown node types: function) all though it is installed

**URL:** <https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627>\
**Category:** Core Development\
**Created:** [20 July 2021 06:29 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627 "2021-07-20T06:29:36Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhpatel177](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dhpatel177/32/39248_2.png) [@dhpatel177](https://discourse.nodered.org/u/dhpatel177)\
**Post date:** [20 July 2021 06:29 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/1 "2021-07-20T06:29:36Z")

</div>

Hello,

I have already installed function node and when I deploy the flow it always gives an error message : "The workspace contains some unknown node types: function". Also I am unable to see the function node on left palette.

Is version of Node Red affects this? if yes then how I can go to old version in Node Red docker?  
Attaching some screen shots.

Regards,  
Darshan Patel

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/1/51b93a2750ef910ecf4b33880c02ce23c9c29532.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/5/052a7ebbdbc220570a93076001a8498fcca225c5.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/4/645e676d0d1984a00933ac162ed413b331a70e52.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/e/beaf758ac79f8be46ef888fa5aec2b4de5ac5007.png)

---

<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:** [20 July 2021 06:38 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/2 "2021-07-20T06:38:13Z")

</div>

The function node is a built-in node. It isn't one you install separately.

It is very strange for it to be unknown like this.

There must be an error message in the Node-RED log when it starts up that will give some clues as to what is happening.

Can you also confirm what version of Node-RED and node.js you are using?

---

<div class="post-metadata">

**Author:** ![dhpatel177](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dhpatel177/32/39248_2.png) [@dhpatel177](https://discourse.nodered.org/u/dhpatel177)\
**Post date:** [20 July 2021 07:10 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/3 "2021-07-20T07:10:16Z")

</div>

node -v : v10.15.3  
node-red : 1.0.6 (No error for this function node)  
node-red : docker - 1.3.5(Error occurs for this function node)

P.S. : my main project is in Node Red Docker locally I am using 1.0.6 but when I create an image using docker its version is 1.3.5

---

<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:** [20 July 2021 07:37 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/4 "2021-07-20T07:37:57Z")

</div>

What about the log output when Node-RED starts?

---

<div class="post-metadata">

**Author:** ![dhpatel177](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dhpatel177/32/39248_2.png) [@dhpatel177](https://discourse.nodered.org/u/dhpatel177)\
**Post date:** [20 July 2021 07:46 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/5 "2021-07-20T07:46:59Z")

</div>

@knolleary  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/8/6801660301b774aacd0c69a9db50edd42be04188.png)

it is not giving any error.

Can u guide me how I can create Node Red image for old version rather than 1.3.5 using docker?

---

<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:** [20 July 2021 08:02 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/6 "2021-07-20T08:02:19Z")

</div>

That log says that it is creating a new log file, so it isn't the same setup that you showed earlier with the missing nodes.

---

<div class="post-metadata">

**Author:** ![dhpatel177](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dhpatel177/32/39248_2.png) [@dhpatel177](https://discourse.nodered.org/u/dhpatel177)\
**Post date:** [20 July 2021 08:09 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/7 "2021-07-20T08:09:25Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/e/ae2151599a1385e051b426e3c10b667c6cf794bc.png)

In console I am getting this error.  
Is it related to this problem?

---

<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:** [20 July 2021 08:21 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/8 "2021-07-20T08:21:23Z")

</div>

Yes, that error is the reasons the Function node is failing to load. However I cannot explain why you are hitting it. A normal 1.3.5 build works just fine.

How exactly are you building the docker image?

Are you pulling the published image from dockerhub or building your own?

---

<div class="post-metadata">

**Author:** ![dhpatel177](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dhpatel177/32/39248_2.png) [@dhpatel177](https://discourse.nodered.org/u/dhpatel177)\
**Post date:** [20 July 2021 08:43 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/9 "2021-07-20T08:43:53Z")

</div>

I had downloaded code once from following url:

> **[node-red/node-red-docker](https://github.com/node-red/node-red-docker/tree/master/docker-custom)**
>
> master/docker-custom

from then I am using that code to create my docker image with minor changes.  
I am not downloading new code every time!!

---

<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:** [20 July 2021 08:49 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/10 "2021-07-20T08:49:56Z")

</div>

Does your custom build npm install node-red@1.3.5 each time? Or have you got a local copy of the source code for that as well?

---

<div class="post-metadata">

**Author:** ![dhpatel177](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dhpatel177/32/39248_2.png) [@dhpatel177](https://discourse.nodered.org/u/dhpatel177)\
**Post date:** [20 July 2021 09:08 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/11 "2021-07-20T09:08:26Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/8/98cd96bfd0100fbb3e6fa63658a90108d03b090c.png)  
I am simply replacing file using copy!! and runs docker command.

I add some dependencies required for my code in package.json like following:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/9/a9174abf497f0eefd2b15996eb24b35485f5ca86.png)

---

<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:** [20 July 2021 09:32 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/12 "2021-07-20T09:32:20Z")

</div>

> I am simply replacing file using copy!!

So you aren't using a proper build of node-red? You didn't mention that at the start.

What version of code is your custom red.min.js built from?

The error is because you have the 1.3.5 version of the Function node installed, but your custom red.min.js is older and doesn't provide the apis that version of the Function node expects.

If you are going to use a custom build of Node-RED, you really need to make sure you keep it all in sync and not just the editor.

---

<div class="post-metadata">

**Author:** ![dhpatel177](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dhpatel177/32/39248_2.png) [@dhpatel177](https://discourse.nodered.org/u/dhpatel177)\
**Post date:** [20 July 2021 11:37 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/13 "2021-07-20T11:37:04Z")

</div>

Ok thanks @knolleary for your guidance I will keep it in sync!!

---

<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:** [18 September 2021 11:37 UTC](https://discourse.nodered.org/t/function-node-gives-an-error-the-workspace-contains-some-unknown-node-types-function-all-though-it-is-installed/48627/14 "2021-09-18T11:37:07Z")

</div>

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