nxrocks icon indicating copy to clipboard operation
nxrocks copied to clipboard

Custom Target Not Working

Open brandon-mitchell-midwest opened this issue 11 months ago • 1 comments

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

  1. Create custom target in project.json
  2. Run command to call that target
  3. 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?

tinesoft avatar Mar 27 '25 06:03 tinesoft