# Plugin files are loaded but its entrypoint is never executed

**URL:** <https://discourse.nodered.org/t/plugin-files-are-loaded-but-its-entrypoint-is-never-executed/99017>\
**Category:** Developing Nodes\
**Created:** [11 September 2025 20:44 UTC](https://discourse.nodered.org/t/plugin-files-are-loaded-but-its-entrypoint-is-never-executed/99017 "2025-09-11T20:44:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [11 September 2025 20:44 UTC](https://discourse.nodered.org/t/plugin-files-are-loaded-but-its-entrypoint-is-never-executed/99017/1 "2025-09-11T20:44:43Z")

</div>

Node-RED loads the plugin files but its entrypoint isnt executed.

**Repository to reproduce:**

> **[GitHub - AllanOricil/node-red-nrg-plugin-tests: experiment](https://github.com/AllanOricil/node-red-nrg-plugin-tests)**
>
> experiment

**Steps to reproduce:**

1. pnpm install
2. pnpm build:server:dev
3. install dist folder in your node-red
4. start node-red and verify server plugin files are loaded but its entrypoint function is never executed

**Environment:**

- Node-RED version: 4.1.0 and 4.0.9
- Node 18 and 22
- Macos

What am I during wrong? Even when opening the editor I dont see the plugin's server entrypoint tunction being executed.

Opened an issue in github

> <https://github.com/node-red/node-red/issues/5268>
>
> \### Current Behavior
> 
> Node-RED loads the plugin files but its entrypoint isn't e…xecuted.
> 
> !\[Image\](https://github.com/user-attachments/assets/b6fa1744-8c58-4167-83e6-6573621bc872)
> 
> \<img width="701" height="407" alt="Image" src="https://github.com/user-attachments/assets/a6e0965a-6a12-4229-a2eb-f9fad8844bae" /\>
> 
> !\[Image\](https://github.com/user-attachments/assets/dec38ffe-7b0b-4337-8529-38c5057fa14e)
> 
> !\[Image\](https://github.com/user-attachments/assets/73812ad7-f30c-4153-b283-0bd951bc2e76)
> 
> !\[Image\](https://github.com/user-attachments/assets/b8f1c73c-9a4e-429e-b7da-5ae2e735de32)
> 
> \### Expected Behavior
> 
> Plugin's server entrypoint must run before nodes are loaded when its files are required by node-red, specially if node-red says the plugin is loaded and enabled
> 
> \### Steps To Reproduce
> 
> 0. Clone https://github.com/AllanOricil/node-red-nrg-plugin-tests
> 1. pnpm install
> 2. pnpm build:server:dev. If you open dist/package.json you will see that the plugin entrypoint is set under a node-red prop.
> 3. install dist folder in your node-red
> 4. start node-red and verify server plugin files are loaded but its entrypoint function is never executed
> 
> \### Example flow
> 
> NA
> 
> \### Environment
> 
> \- Node-RED version: 4.1.0 and 4.0.9
> \- Node.js version: 22 and 18
> \- npm version: NA
> \- Platform/OS: nacos
> \- Browser: NA

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [11 September 2025 21:23 UTC](https://discourse.nodered.org/t/plugin-files-are-loaded-but-its-entrypoint-is-never-executed/99017/2 "2025-09-11T21:23:33Z")

</div>

I'm a bit confused as to how you are trying to do things. You still need an entry in the package.json don't you? In order to tell Node-RED that the plugin needs to be processed?

---

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [11 September 2025 21:25 UTC](https://discourse.nodered.org/t/plugin-files-are-loaded-but-its-entrypoint-is-never-executed/99017/3 "2025-09-11T21:25:09Z")

</div>

There is. The files are required by node-red. But the entrypoint is called.

This is the entrypoint being required by node-red

 ![IMG-20250911-WA0007](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/8/a8dceecd58279203c0d95cca4135aae04ab258da.jpeg)

Here is the initial plugin being loaded without a problem

 ![IMG-20250911-WA0008](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/5/457258a073391847867ea0e174beacaaac3e904c.jpeg)  
 ![IMG-20250911-WA0009](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/7430687491968ea70ca48a3924d3503d1325182f.jpeg)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [11 September 2025 21:30 UTC](https://discourse.nodered.org/t/plugin-files-are-loaded-but-its-entrypoint-is-never-executed/99017/4 "2025-09-11T21:30:20Z")

</div>

> [@AllanOricil](#):
>
> There is

I must be missing something:

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

Don't you need a node-red section?

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

---

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [11 September 2025 21:31 UTC](https://discourse.nodered.org/t/plugin-files-are-loaded-but-its-entrypoint-is-never-executed/99017/5 "2025-09-11T21:31:39Z")

</div>

Look at the dist. You must build it, and install the build

 ![IMG-20250911-WA0012](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/d/dd4a15024ca4ca5d9b47a1307a0ac6ed8e46cc6b.jpeg)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [11 September 2025 21:36 UTC](https://discourse.nodered.org/t/plugin-files-are-loaded-but-its-entrypoint-is-never-executed/99017/6 "2025-09-11T21:36:06Z")

</div>

OK, dist isn't in the github repo so I can't see it.

Normally though, the package.json that node-red will acknowledge is in the root of the package, not in a folder. Could that be the issue?

---

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [11 September 2025 21:37 UTC](https://discourse.nodered.org/t/plugin-files-are-loaded-but-its-entrypoint-is-never-executed/99017/7 "2025-09-11T21:37:51Z")

</div>

I installed the dist folder.

 ![image-3](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/5/45185a783caf1da75893d9e4d5ae166df76ce192.png)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [11 September 2025 21:39 UTC](https://discourse.nodered.org/t/plugin-files-are-loaded-but-its-entrypoint-is-never-executed/99017/8 "2025-09-11T21:39:32Z")

</div>

OK, I don't think I can help without running your build which I can't do right now.

---

<div class="post-metadata">

**Author:** ![AllanOricil](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allanoricil/32/106911_2.png) [@AllanOricil](https://discourse.nodered.org/u/AllanOricil)\
**Post date:** [12 September 2025 12:00 UTC](https://discourse.nodered.org/t/plugin-files-are-loaded-but-its-entrypoint-is-never-executed/99017/9 "2025-09-12T12:00:05Z")

</div>

Continue in the github issue.

---

<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:** [11 November 2025 12:00 UTC](https://discourse.nodered.org/t/plugin-files-are-loaded-but-its-entrypoint-is-never-executed/99017/10 "2025-11-11T12:00:13Z")

</div>

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