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

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

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?

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

What about the log output when Node-RED starts?

@knolleary
image

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?

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.

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

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?

I had downloaded code once from following url:

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

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?


I am simply replacing file using copy!! and runs docker command.

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

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.

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

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