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

Could not add the plugin in a way which does not conflict with existing targets. #22972

Open
1 of 4 tasks
kenobi-io opened this issue Apr 24, 2024 · 4 comments
Open
1 of 4 tasks
Assignees
Labels

Comments

@kenobi-io
Copy link

kenobi-io commented Apr 24, 2024

Current Behavior

i try nestjs app via nx (npx nx g @nx/nest:app bff )

Expected Behavior

create nestjs app in workspace

GitHub Repo

No response

Steps to Reproduce

  1. create workspace
  2. npx nx add @nx/nest
  3. npx nx g @nx/nest:app bff

Nx Report

npx nx g @nx/nest:app bff --frontendProject shell --verbose --directory apps/nodes                                                                      

 NX  Generating @nx/nest:application

✔ What should be the project name and where should it be generated? · bff @ apps/nodes

 NX   Could not add the plugin in a way which does not conflict with existing targets. Please report this error at: https://github.com/nrwl/nx/issues/new/choose

Failure Logs

Error: Could not add the plugin in a way which does not conflict with existing targets. Please report this error at: https://github.com/nrwl/nx/issues/new/choose
    at addPlugin (/my-project/node_modules/@nx/devkit/src/utils/add-plugin.js:62:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at webpackInitGeneratorInternal (/my-project/node_modules/@nx/webpack/src/generators/init/init.js:18:9)
    at applicationGeneratorInternal (/my-project/node_modules/@nx/node/src/generators/application/application.js:304:33)
    at applicationGenerator (/my-project/node_modules/@nx/node/src/generators/application/application.js:265:12)
    at applicationGeneratorInternal (/my-project/node_modules/@nx/nest/src/generators/application/application.js:25:33)
    at /my-project/node_modules/nx/src/command-line/generate/generate.js:241:26
    at handleErrors (/my-project/node_modules/nx/src/utils/params.js:9:16)
    at Object.handler (/my-project/node_modules/nx/src/command-line/generate/command-object.js:13:22)

Package Manager Version

npm

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@elaugier
Copy link

Same issue on windows

@angelocapp97
Copy link

Same issue on macOS

@koshevy
Copy link

koshevy commented May 4, 2024

Same issue on MacOS at this command:

nx g @nx/storybook:configuration <project-name> --interactionTests=true --uiFramework=@storybook/react-webpack5

Library's project.json:

{
  "name": "<project-name>",
  "$schema": "../../node_modules/nx/schemas/project-schema.json",
  "sourceRoot": "libs/<project-name>",
  "projectType": "library",
  "targets": {
    "build": {
      "executor": "@nx/js:swc",
      "outputs": ["{options.outputPath}"],
      "options": {
        "outputPath": "dist/libs/<project-name>",
        "main": "libs/<project-name>/index.ts",
        "tsConfig": "libs/<project-name>/tsconfig.lib.json",
        "assets": ["libs/<project-name>/*.md"]
      }
    },
    "publish": {
      "command": "node tools/scripts/publish.mjs <project-name> {args.ver} {args.tag}"
    },
    "lint": {
      "executor": "@nx/linter:eslint",
      "outputs": ["{options.outputFile}"],
      "options": {
        "lintFilePatterns": ["libs/<project-name>/**/*.ts"]
      }
    },
    "test": {
      "executor": "@nx/jest:jest",
      "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
      "options": {
        "jestConfig": "libs/<project-name>/jest.config.ts",
        "passWithNoTests": true
      },
      "configurations": {
        "ci": {
          "ci": true,
          "codeCoverage": true
        }
      }
    },
    "cli": {
      "command": "node ./libs/<project-name>/cli.js"
    }
  },
  "tags": []
}

@seriouscoderone
Copy link

This appears to be caused by the @nx/webpack/plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants