Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Modifying packages and building the application results in the build using dependencies from npm instead of from within the monorepo. #1732

Closed
saevarb opened this issue Feb 15, 2024 · 1 comment
Labels
enhancement New feature or request in-work Issue in work

Comments

@saevarb
Copy link

saevarb commented Feb 15, 2024

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

  1. Pull the repository
  2. Make changes to e.g. flowise-components
  3. Build and run the application
  4. Observe that the changes you made to flowise-components are 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.

@HenryHengZJ
Copy link
Contributor

yep we will be transitioning to pnpm, a draft PR here

@HenryHengZJ HenryHengZJ added enhancement New feature or request in-work Issue in work labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in-work Issue in work
Projects
None yet
Development

No branches or pull requests

2 participants