-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
npmInstall ignores npm workspaces in up-to-date detection #304
Comments
hosswald
changed the title
npmInstall does not detect monorepo changes
npmInstall does not detect monorepo workspace changes
Feb 14, 2024
hosswald
changed the title
npmInstall does not detect monorepo workspace changes
npmInstall ignores npm workspaces in up-to-date detection
Feb 14, 2024
Ditto for yarn workspaces. I need to tell gradle-node-plugin to use a subfolder for package.json and root for the lock file. |
I just changed my module setup and now I am encountering this.
It seems, it is because I have the relevant dependency defined in the parent module. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have a monorepo with multiple workspaces. The workspaces also reflect the gradle (sub)project structure.
Our project structure looks like this:
The root
package.json
definedscripts/
as a workspace:We apply the gradle-node-plugin in the
scripts/build.gradle
like this:The problem is that
npmInstall
only registers changes to the rootpackage.json
etc., but not toscripts/package.json
etc.So if I change a dependency in
scripts/package.json
,npmInstall
might not run.It would be nice if the
npmInstall
task could check for changes inpackage.json
etc. in all workspaces defined in the rootpackage.json
as well.Currently, we need this workaround:
I don't think the problem is related to our unusual project structure, but likely affects every situation where NPM workspaces are involved - NpmInstallTask just doesn't seem to consider changes to workspace files / npm files outside of
nodeProjectDir
at all.The text was updated successfully, but these errors were encountered: