FlowFuse / flowfuse

Build bespoke, flexible, and resilient manufacturing low-code applications with FlowFuse and Node-RED
https://flowfuse.com
Other
246 stars 59 forks source link

I use the default flowforge code, and I want to use a custom node in the built-in nodered, what should I do #1562

Closed Soonogo closed 1 year ago

Soonogo commented 1 year ago

Current Behavior

I run npm i flowforge-nr-file-nodes in flowforge , install my custom nodes

image

Expected Behavior

image

it can be displayed here

Steps To Reproduce

No response

Environment

hardillb commented 1 year ago

Please add a lot more detail here. It really is not clear what problem you are having.

Soonogo commented 1 year ago

I want to add a local self-written node to nodered in flowforge, and I don't want to publish it

hardillb commented 1 year ago

The simplest option is to:

If you are using the Docker or Kubernetes version of FlowForge, you can also build your own stack container.

Soonogo commented 1 year ago

i don't have this button

Soonogo commented 1 year ago

Can I run npm install ~/repos/nodered/nodes/create-chart in the ~/.nodered directory to achieve the same effect

hardillb commented 1 year ago

No, the FlowForge projects do not use the default Node-RED UserDir.

Soonogo commented 1 year ago

I'm using 2.2.2, run npm run install-stack --vers=2.2.2, I can also upgrade it to above 3.0

image

pallet I only added exclude 10-file.js

hardillb commented 1 year ago

You will need a Node-RED 3.0.x for the tgz upload button.

You will need to create a new stack (use bin/ff-install-stack.sh 3.0.2 in the FlowForge install directory), then create the stack under the Admin Settings.

Soonogo commented 1 year ago

I want to modify the source code of nodered after git clone, so how to modify the started nodered after the operation is my modification, not the nodered under /var/stacks

Soonogo commented 1 year ago

Now I run npm run install-stack --vers=3.0.2, but still no button

image image
hardillb commented 1 year ago

Sorry, I screwed up, it was early this morning and I wasn't thinking. The tgz upload feature is explicitly disabled in FlowForge.

Let's start again. What problem are you actually trying to solve here:

  1. To install a custom node into a single project?
  2. To install a custom node so it is available to all projects?

For option 2 you can run the following command in the FlowForge directory.

npm install --prefix var/stacks/3.0.2 ~/repos/nodered/nodes/create-chart

This will install your node along side the Node-RED 3.0.2 that is used for the 3.0.2 stack.

Soonogo commented 1 year ago

it ran successfully,Thank you very much