# Packaging nested subflows

**URL:** <https://discourse.nodered.org/t/packaging-nested-subflows/51101>\
**Category:** Developing Nodes\
**Created:** [16 September 2021 12:42 UTC](https://discourse.nodered.org/t/packaging-nested-subflows/51101 "2021-09-16T12:42:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![guidone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/guidone/32/48116_2.png) [@guidone](https://discourse.nodered.org/u/guidone)\
**Post date:** [16 September 2021 12:42 UTC](https://discourse.nodered.org/t/packaging-nested-subflows/51101/1 "2021-09-16T12:42:50Z")

</div>

I'm having troubles packaging nested subflows into the same npm package (packaging the nodes separately is not an option).

I've created a proof of concept with three simple subflows: Subflow A thats uses Subflow B which uses Subflow C. Inside the package I just need to change the way the subflows are referenced (instead of "subflow:" use "my-subflow-type".  
I've a script for that and it works perfectly.

Then I apply the same script to a more complex subflows and something is going wrong but the logs here are not helping

 ![nested-subflow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/7/47d2a93ac5570a35fda68c82ade9a613ceeb77eb.png)

Here NR is not finding a node type "flows-orchestrator-contact-io", in only loads the two function nodes (the node flows-orchestrator-contact-io is visible in the palette, it's working and is correctly referenced with the type and not the subflow:).

So there's something going wrong here, my question is: **where in the code I can find the place that loads the subflow in order to do some debugging? I've searched the code base for "start module:" (in order to debug near these line of codes) but I've found nothing.**

Can anyone help?

Thanks

---

<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:** [15 November 2021 12:43 UTC](https://discourse.nodered.org/t/packaging-nested-subflows/51101/2 "2021-11-15T12:43:14Z")

</div>

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