SethEden / haystacks-async

A basic asynchronous NodeJS framework that can be easily re-used and forked to make many different kinds of apps written with ES6 syntax.
Other
4 stars 5 forks source link

Haystacks-Plugin Linking Issue #40

Open SethEden opened 1 year ago

SethEden commented 1 year ago

The user must still clone the Haystacks/async repo locally, then link it to their application and to all their plugins as well. I'll need to work to understand why this is. This is apparently the only way to get the loading of plugins to work. I am wondering if it has something to do with the execution context, but there are no differences between the develop & production branches, and there is no difference between the production and what is published on npm. I will likely need help understanding and solving this issue.

SethEden commented 1 year ago

Possible fix: Apparently the business rules and commands from the data that are cloned from the original instance of Haystacks, can only execute from the code located at the path of the original location. When we are using the plugin to call the accouter Framework function we are actually bootstrapping a Haystacks instance from within the plugins own node_modules path, not the original path. This is why the plugins instance of Haystacks needed to be linked. We can get around that by re-initializing the business rules and the commands for this instance of Haystacks and over-write the same business rules and commands in the above data structure. That should in theory solve the linking issue.