[BUG] Modifying packages and building the application results in the build using dependencies from `npm` instead of from within the monorepo.
Describe the bug
When I created my fork to add some new tools and extensions, I ran into issues with the build process not picking up my changes. This turned out to be because e.g. flowise-components has been published to npm and/or because yarn v1 is rather limited when it comes to controlling resolution of dependencies within a monorepo. The server's dependency is just "flowise-components": "*", and since this package exists in the npm registry, it would pull that package instead of the local version from inside the monorepo. To avoid this, I had to use yarn link, and also add this as an additional step to the dockerfile to ensure it used my modified flowise-components package.
To Reproduce
- Pull the repository
- Make changes to e.g.
flowise-components - Build and run the application
- Observe that the changes you made to
flowise-componentsare not in your build.
Expected behavior
I expect the monorepo to depend on the packages within the monorepo instead of the versions in npm.
I personally don't think there is any particularly compelling reason for flowise-components to be published to npm, but I can see why one might want to do it, and either way, it is already done.
Potential solutions
Transition to yarn berry or pnpm(which would be my choice), where you can use workspace: protocol in your package.json to ensure that the packages within the monorepo depend on each other instead of the ones published to npm.
If you are interested, I'd be willing to try making a pull request to transition to pnpm.
yep we will be transitioning to pnpm, a draft PR here