nxrocks
nxrocks copied to clipboard
Custom Target Not Working
Plugin Name
@nxrocks/nx-spring-boot
Nx Report
Node : 18.20.6 OS : darwin-arm64 Native Target : aarch64-macos npm : 10.8.2
nx : 20.4.0 @nx/js : 20.4.0 @nx/jest : 20.4.0 @nx/eslint : 20.4.0 @nx/workspace : 20.4.0 @nx/devkit : 20.4.0 @nx/node : 20.4.0 typescript : 5.7.3
Registered Plugins: @nxrocks/nx-spring-boot
Community plugins: @nxrocks/nx-spring-boot : 10.2.6
Expected Behaviour
For my application to be able to run custom targets so I can pass arguments easily.
Actual Behaviour
Running "npx nx serve auth" works but running "npx nx serve-dev auth" fails.
This is my project.json:
{
"root": "apps/auth",
"sourceRoot": "apps/auth/src",
"projectType": "application",
"name": "auth",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"tags": [],
"targets": {
"serve": {
"executor": "@nxrocks/nx-spring-boot:serve",
"options": {
"args": [
"-Dspring-boot.run.jvmArguments=\"-Dspring.profiles.active=local\""
]
}
},
"serve-dev": {
"executor": "@nxrocks/nx-spring-boot:serve",
"options": {
"args": [
"-Dspring-boot.run.jvmArguments=\"-Dspring.profiles.active=development\""
]
}
}
}
}
error thrown: NX The "paths[1]" argument must be of type string. Received undefined
Steps to reproduce the behaviour
- Create custom target in project.json
- Run command to call that target
- See error
Hi,
Sorry for the late answer;. Can you please try updating to the latest version of the plugin (v11.01) and let me know if the problem persist?