tinesoft / nxrocks

Set of Nx plugins to enhance your Nx workspace (even more!)
MIT License
307 stars 34 forks source link

[Bug] does not support schematics #172

Closed brendonanderson closed 1 year ago

brendonanderson commented 1 year ago

Plugin Name

@nxrocks/nx-spring-boot

Nx Report

 NX   Report complete - copy this into the issue template

   Node : 16.19.1
   OS   : darwin arm64
   yarn : 3.2.3

   nx : 15.0.13
   @nrwl/angular : Not Found
   @nrwl/cypress : 15.0.13
   @nrwl/detox : 15.0.13
   @nrwl/devkit : 15.0.13
   @nrwl/esbuild : Not Found
   @nrwl/eslint-plugin-nx : 15.0.13
   @nrwl/expo : Not Found
   @nrwl/express : 15.0.13
   @nrwl/jest : 15.0.13
   @nrwl/js : 15.0.13
   @nrwl/linter : 15.0.13
   @nrwl/nest : Not Found
   @nrwl/next : 15.0.13
   @nrwl/node : 15.0.13
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : Not Found
   @nrwl/react : 15.0.13
   @nrwl/react-native : 15.0.13
   @nrwl/rollup : 15.0.13
   @nrwl/schematics : Not Found
   @nrwl/storybook : 15.0.13
   @nrwl/web : 15.0.13
   @nrwl/webpack : 15.0.13
   @nrwl/workspace : 15.0.13
   typescript : 4.8.4
   ---------------------------------------
   Local workspace plugins:
   ---------------------------------------
   Community plugins:
     @nx-plus/docusaurus: 14.1.0
     @nx-tools/nx-container: 4.0.3
     @nxrocks/nx-spring-boot: 8.0.3
     @webpro/nx-tsc: 0.0.1

Expected Behaviour

A new spring boot project would be created.

Actual Behaviour

When attempting to generate a spring-boot project it throws an error. I had to install a couple of angular libraries to get this far:

yarn add @angular-devkit/core --dev yarn add @angular-devkit/schematics --dev

>  NX  Generating @nxrocks/nx-spring-boot:project

✔ What kind of project are you generating? · application
✔ Which build system would you like to use? · maven-project
✔ Which packaging would you like to use? · jar
✔ Which version of Java would you like to use? · 17
✔ Which language would you like to use? · java
✔ What groupId would you like to use? · com.example
✔ What artifactId would you like to use? · my-api
✔ What package name would you like to use? · com.example.api
✔ What is the project about? · sample api
✔ Skip code formatting support(using Spotless plugin)? (Y/n) · true

 >  NX   Package "@nxrocks/nx-spring-boot" was found but does not support schematics.

Error: Package "@nxrocks/nx-spring-boot" was found but does not support schematics.
    at NodeModulesEngineHost.resolve (/Users/userid/projects/company-web/node_modules/@angular-devkit/schematics/tools/node-module-engine-host.js:53:23)
    at NodeModulesEngineHost._resolveCollectionPath (/Users/userid/projects/company-web/node_modules/@angular-devkit/schematics/tools/node-module-engine-host.js:80:37)
    at NodeModulesEngineHost.createCollectionDescription (/Users/userid/projects/compay-web/node_modules/@angular-devkit/schematics/tools/file-system-engine-host-base.js:118:27)
    at SchematicEngine._createCollectionDescription (/Users/userid/projects/company-web/node_modules/@angular-devkit/schematics/src/engine/engine.js:161:40)
    at SchematicEngine.createCollection (/Users/userid/projects/company-web/node_modules/@angular-devkit/schematics/src/engine/engine.js:154:43)
    at getCollection (/Users/userid/projects/company-web/node_modules/nx/src/adapter/ngcli-adapter.js:65:40)
    at Object.<anonymous> (/Users/userid/projects/company-web/node_modules/nx/src/adapter/ngcli-adapter.js:547:28)
    at Generator.next (<anonymous>)
    at /Users/userid/projects/company-web/node_modules/tslib/tslib.js:118:75
    at new Promise (<anonymous>)

Steps to reproduce the behaviour

This is my first time trying this in an existing project. All I did was install the two angular libraries as indicated above otherwise ran the standard command (using yarn).

tinesoft commented 1 year ago

Hi @brendonanderson

Thanks for using the plugin.

The issue is weird... have you tried deleting the node_modules and re-run yarn install? Can you share your package.json file please?

brendonanderson commented 1 year ago

I removed the node_modules using rm -rf node_modules reran yarn install then ran

 yarn nx g @nxrocks/nx-spring-boot:new my-new-api --verbose

>  NX  Generating @nxrocks/nx-spring-boot:project

✔ What kind of project are you generating? · application
✔ Which build system would you like to use? · maven-project
✔ Which packaging would you like to use? · jar
✔ Which version of Java would you like to use? · 17
✔ Which language would you like to use? · java
✔ What groupId would you like to use? · com.example
✔ What artifactId would you like to use? · demo
✔ What package name would you like to use? · com.example.demo
✔ What is the project about? · Test
✔ Skip code formatting support(using Spotless plugin)? (Y/n) · true

 >  NX   Package "@nxrocks/nx-spring-boot" was found but does not support schematics.

Error: Package "@nxrocks/nx-spring-boot" was found but does not support schematics.
    at NodeModulesEngineHost.resolve (/Users/userid/projects/mycompany-web/node_modules/@angular-devkit/schematics/tools/node-module-engine-host.js:53:23)
    at NodeModulesEngineHost._resolveCollectionPath (/Users/userid/projects/mycompany-web/node_modules/@angular-devkit/schematics/tools/node-module-engine-host.js:80:37)
    at NodeModulesEngineHost.createCollectionDescription (/Users/userid/projects/mycompany-web/node_modules/@angular-devkit/schematics/tools/file-system-engine-host-base.js:118:27)
    at SchematicEngine._createCollectionDescription (/Users/userid/projects/mycompany-web/node_modules/@angular-devkit/schematics/src/engine/engine.js:161:40)
    at SchematicEngine.createCollection (/Users/userid/projects/mycompany-web/node_modules/@angular-devkit/schematics/src/engine/engine.js:154:43)
    at getCollection (/Users/userid/projects/mycompany-web/node_modules/nx/src/adapter/ngcli-adapter.js:65:40)
    at Object.<anonymous> (/Users/userid/projects/mycompany-web/node_modules/nx/src/adapter/ngcli-adapter.js:547:28)
    at Generator.next (<anonymous>)
    at /Users/userid/projects/mycompany-web/node_modules/tslib/tslib.js:118:75
    at new Promise (<anonymous>)

package.json

{
  "name": "mycompany-web",
  "version": "0.1.1",
  "engines": {
    "node": ">16.19.1",
    "npm": "use-yarn-not-npm",
    "yarn": ">1.22.0"
  },
  "packageManager": "yarn@3.2.3",
  "scripts": {
    "start": "nx serve",
    "start:servicing": "nx serve servicing| pino-pretty",
    "docker:sidecar": "yarn nx run tls-sidecar:build",
    "storybook": "yarn nx run ui-storybook:storybook",
    "build:storybook": "yarn nx run ui-storybook:build-storybook",
    "test": "nx affected --target=test --parallel --max-parallel=2",
    "test:coverage": "nx affected --target=test --parallel --max-parallel=2 --coverage && node ./scripts/coverage-merger.js",
    "lint": "nx affected --target=lint --parallel --max-parallel=4",
    "lint:style": "stylelint \"{apps,libs}/**/*.{tsx,ts}\"",
    "lint:project.json": "zx scripts/project-json-linting.mjs",
    "lint:codemod": "eslint-interactive ./libs/**/src ./apps/servicing",
    "lint:workspace": "nx workspace-lint && yarn nx run workspace-files:lint",
    "ts": "nx affected --target=tsc --parallel --max-parallel=3",
    "format": "nx format:write",
    "format:check": "nx format:check",
    "postinstall": "husky install",
    "codegen:graphql": "graphql-codegen --config libs/graphql/codegen/types.ts && graphql-codegen --config libs/graphql/codegen/servicing.ts && graphql-codegen --config libs/graphql/codegen/connect.ts && yarn nx format",
    "build:docs": "nx run docs:build",
    "upgrade": "yarn upgrade-interactive",
    "upgrade:nx": "yarn nx migrate latest",
    "e2e:atoms": "nx e2e _e2e-storybook-atoms-e2e --watch",
    "e2e:form": "nx e2e _e2e-storybook-form-e2e --watch",
    "e2e:molecules": "nx e2e _e2e-storybook-molecules-e2e --watch",
    "e2e:template": "nx e2e _e2e-storybook-template-e2e --watch",
    "e2e:servicing": "nx e2e servicing-e2e --watch",
    "e2e:servicing-smoke": "nx run servicing-e2e-smoke:e2e",
    "build:doi": "nx build doi",
    "lint:doi-all": "nx run-many --target=lint --projects=doi,doi-components-common,doi-components-form,doi-components-general-page,doi-components-header,doi-components-modal,doi-constants,doi-contexts",
    "test:doi-all": "nx run-many --target=test --projects=doi,doi-components-common,doi-components-form,doi-components-general-page,doi-components-header,doi-components-modal,doi-constants,doi-contexts"
  },
  "private": true,
  "sideEffects": false,
  "dependencies": {
    "@amir04lm26/react-modern-calendar-date-picker": "^1.0.1",
    "@apollo/datasource-rest": "6.0.0",
    "@apollo/server": "4.7.1",
    "@apollo/subgraph": "2.4.3",
    "@aws-amplify/auth": "4.5.4",
    "@aws-amplify/core": "4.5.4",
    "@aws-amplify/ui-react": "^2.18.1",
    "@datadog/browser-rum": "4.30.1",
    "@docusaurus/core": "2.4.0",
    "@docusaurus/preset-classic": "2.4.0",
    "@docusaurus/theme-mermaid": "2.4.0",
    "@emotion/react": "11.10.4",
    "@emotion/styled": "11.10.4",
    "@forgerock/javascript-sdk": "3.4.0",
    "@graphql-codegen/typescript-react-query": "^3.5.12",
    "@graphql-tools/merge": "8.4.2",
    "@graphql-tools/mock": "8.7.20",
    "@graphql-tools/schema": "9.0.19",
    "@graphql-tools/utils": "9.2.1",
    "@hookform/resolvers": "^2.8.10",
    "@mdx-js/react": "^1.6.21",
    "@mui/icons-material": "5.11.0",
    "@mui/material": "^5.8.2",
    "@mui/x-date-pickers": "5.0.12",
    "@nrwl/next": "15.0.13",
    "@radix-ui/colors": "^0.1.8",
    "@radix-ui/react-accordion": "^1.0.1",
    "@radix-ui/react-alert-dialog": "^1.0.2",
    "@radix-ui/react-checkbox": "^1.0.1",
    "@radix-ui/react-collapsible": "1.0.1",
    "@radix-ui/react-dialog": "^1.0.2",
    "@radix-ui/react-dropdown-menu": "^2.0.1",
    "@radix-ui/react-icons": "^1.1.1",
    "@radix-ui/react-label": "^2.0.0",
    "@radix-ui/react-navigation-menu": "^1.1.1",
    "@radix-ui/react-radio-group": "^1.1.0",
    "@radix-ui/react-select": "^1.1.1",
    "@radix-ui/react-slider": "1.1.0",
    "@radix-ui/react-tabs": "1.0.1",
    "@radix-ui/react-toast": "^1.1.1",
    "@radix-ui/react-tooltip": "^1.0.2",
    "@react-native-community/checkbox": "0.5.15",
    "@react-native-community/datetimepicker": "6.7.5",
    "@react-native-community/netinfo": "9.3.7",
    "@react-native-menu/menu": "0.7.3",
    "@react-navigation/drawer": "6.5.6",
    "@react-navigation/native": "6.1.1",
    "@react-navigation/native-stack": "6.9.7",
    "@reduxjs/toolkit": "1.9.1",
    "@storybook/addon-docs": "6.5.4",
    "@storybook/addon-react-native-web": "0.0.20",
    "@tamagui/animations-reanimated": "1.7.7",
    "@tamagui/core": "1.7.7",
    "@tamagui/shorthands": "1.7.7",
    "@tamagui/themes": "1.7.7",
    "@testing-library/cypress": "^8.0.2",
    "@testing-library/user-event": "^14.2.1",
    "@mycompany/client-api-client": "0.0.42",
    "@mycompany/consumer-fraternal-api-client": "0.0.45",
    "@types/crypto-js": "^4.1.1",
    "@types/express": "4.17.14",
    "@types/prop-types": "15.7.5",
    "@types/react-i18next": "8.1.0",
    "@types/react-loading-overlay": "^1.0.1",
    "@types/react-router-dom": "5.3.3",
    "@types/react-select": "5.0.1",
    "@types/react-table": "7.7.14",
    "@types/styled-system": "^5.1.15",
    "@types/supertest": "2.0.12",
    "amazon-cognito-identity-js": "5.2.8",
    "aws-amplify": "^4.3.22",
    "axios": "1.1.2",
    "axios-mock-adapter": "1.21.2",
    "body-parser": "1.20.1",
    "chart.js": "^3.7.1",
    "clsx": "^1.1.1",
    "cookies-next": "2.1.1",
    "core-js": "^3.6.5",
    "cors": "2.8.5",
    "cypress-axe": "^0.14.0",
    "cypress-real-events": "^1.7.0",
    "date-fns": "^2.28.0",
    "date-fns-holiday-us": "1.1.0",
    "date-fns-tz": "1.3.7",
    "dayjs": "1.11.7",
    "dd-trace": "3.11.0",
    "docusaurus-theme-search-typesense": "0.11.0",
    "dotenv": "16.0.3",
    "expo": "^47.0.8",
    "expo-splash-screen": "~0.17.5",
    "expo-status-bar": "~1.4.2",
    "express": "4.18.2",
    "graphql": "^16.5.0",
    "graphql-request": "^4.2.0",
    "graphql-scalars": "1.21.3",
    "graphql-tag": "2.12.6",
    "graphql-voyager": "1.0.2",
    "helmet": "7.0.0",
    "i18next": "22.4.10",
    "jotai": "^1.6.7",
    "jwt-decode": "3.1.2",
    "launchdarkly-js-client-sdk": "3.1.0",
    "launchdarkly-js-sdk-common": "5.0.3",
    "launchdarkly-node-server-sdk": "7.0.0",
    "launchdarkly-react-client-sdk": "3.0.1",
    "libphonenumber-js": "1.10.15",
    "lottie-react": "^2.3.1",
    "msw": "1.2.1",
    "mui-chips-input": "1.3.2",
    "next": "13.0.0",
    "next-auth": "4.21.1",
    "next-connect": "^0.12.2",
    "node-mocks-http": "1.11.0",
    "openid-client": "5.4.0",
    "pino": "^8.3.1",
    "prism-react-renderer": "^1.2.1",
    "react": "18.2.0",
    "react-chartjs-2": "^4.1.0",
    "react-copy-to-clipboard": "5.1.0",
    "react-currency-input-field": "3.6.9",
    "react-day-picker": "^8.3.6",
    "react-dom": "18.2.0",
    "react-google-recaptcha": "2.1.0",
    "react-hook-form": "^7.31.2",
    "react-i18next": "12.2.0",
    "react-is": "18.2.0",
    "react-loading-overlay": "^1.0.1",
    "react-native": "0.70.8",
    "react-native-blob-util": "0.17.1",
    "react-native-bootsplash": "4.4.0",
    "react-native-gesture-handler": "2.8.0",
    "react-native-get-random-values": "1.8.0",
    "react-native-pdf": "6.6.2",
    "react-native-reanimated": "2.13.0",
    "react-native-render-html": "6.3.4",
    "react-native-safe-area-context": "4.4.1",
    "react-native-screens": "3.18.2",
    "react-native-share": "8.2.1",
    "react-native-svg": "13.5.0",
    "react-native-svg-transformer": "1.0.0",
    "react-native-web": "~0.18.10",
    "react-native-webview": "11.23.1",
    "react-phone-input-2": "2.15.1",
    "react-query": "^3.39.0",
    "react-redux": "8.0.5",
    "react-select": "5.7.0",
    "react-table": "7.8.0",
    "react-tracking": "9.3.1",
    "react-use": "^17.4.0",
    "redux-mock-store": "1.5.4",
    "regenerator-runtime": "0.13.7",
    "safe-json-utils": "^1.1.1",
    "sharp": "0.32.0",
    "storybook-addon-next-router": "^4.0.0",
    "styled-components": "5.3.5",
    "styled-system": "^5.1.5",
    "tslib": "^2.3.0",
    "usehooks-ts": "2.9.1",
    "uuid": "^8.3.2",
    "yup": "0.32.11",
    "zod": "^3.17.3"
  },
  "devDependencies": {
    "@actions/core": "^1.10.0",
    "@angular-devkit/core": "16.0.1",
    "@angular-devkit/schematics": "16.0.1",
    "@apollo/rover": "^0.14.0",
    "@babel/core": "^7.18.0",
    "@babel/preset-typescript": "^7.17.12",
    "@cspell/dict-medicalterms": "3.0.0",
    "@cspell/eslint-plugin": "6.31.1",
    "@cypress/grep": "3.1.5",
    "@docusaurus/module-type-aliases": "2.4.0",
    "@graphql-codegen/add": "4.0.1",
    "@graphql-codegen/cli": "3.2.2",
    "@graphql-codegen/introspection": "^2.1.1",
    "@graphql-codegen/near-operation-file-preset": "^2.2.12",
    "@graphql-codegen/typescript": "3.0.2",
    "@graphql-codegen/typescript-graphql-files-modules": "^2.1.1",
    "@graphql-codegen/typescript-operations": "^2.4.0",
    "@graphql-codegen/typescript-resolvers": "3.1.1",
    "@graphql-eslint/eslint-plugin": "3.14.3",
    "@graphql-tools/jest-transform": "1.2.3",
    "@nrwl/cli": "15.0.13",
    "@nrwl/cypress": "15.0.13",
    "@nrwl/detox": "15.0.13",
    "@nrwl/eslint-plugin-nx": "15.0.13",
    "@nrwl/express": "15.0.13",
    "@nrwl/jest": "15.0.13",
    "@nrwl/linter": "15.0.13",
    "@nrwl/node": "15.0.13",
    "@nrwl/react": "15.0.13",
    "@nrwl/react-native": "15.0.13",
    "@nrwl/storybook": "15.0.13",
    "@nrwl/web": "15.0.13",
    "@nrwl/workspace": "15.0.13",
    "@nx-plus/docusaurus": "14.1.0",
    "@nx-tools/container-metadata": "4.0.3",
    "@nx-tools/nx-container": "4.0.3",
    "@nxrocks/nx-spring-boot": "8.0.3",
    "@react-native-async-storage/async-storage": "1.17.10",
    "@react-native-community/cli": "9.1.1",
    "@react-native-community/cli-platform-android": "9.1.0",
    "@react-native-community/cli-platform-ios": "9.1.0",
    "@storybook/addon-a11y": "6.5.13",
    "@storybook/addon-essentials": "^6.5.4",
    "@storybook/addon-styling": "0.3.1",
    "@storybook/builder-webpack5": "^6.5.4",
    "@storybook/core-server": "~6.5.9",
    "@storybook/manager-webpack5": "^6.5.4",
    "@storybook/mdx1-csf": "1.0.0",
    "@storybook/react": "^6.5.4",
    "@svgr/webpack": "^6.3.1",
    "@swc/core": "^1.2.173",
    "@swc/jest": "0.2.20",
    "@testing-library/jest-dom": "5.16.5",
    "@testing-library/jest-native": "5.3.1",
    "@testing-library/react": "13.4.0",
    "@testing-library/react-hooks": "^8.0.0",
    "@testing-library/react-native": "11.5.0",
    "@trivago/prettier-plugin-sort-imports": "3.3.0",
    "@types/cors": "2.8.13",
    "@types/jest": "28.1.8",
    "@types/lodash.isplainobject": "4.0.7",
    "@types/node": "18.7.18",
    "@types/react": "18.0.20",
    "@types/react-copy-to-clipboard": "5.0.4",
    "@types/react-dom": "18.0.6",
    "@types/react-google-recaptcha": "2.1.5",
    "@types/react-is": "17.0.3",
    "@types/react-lottie": "^1.2.6",
    "@types/react-native": "0.70.8",
    "@types/react-tracking": "8.1.3",
    "@types/styled-components": "5.1.26",
    "@types/uuid": "^8.3.4",
    "@typescript-eslint/eslint-plugin": "5.46.1",
    "@typescript-eslint/parser": "5.46.1",
    "@webpro/nx-tsc": "0.0.1",
    "axe-core": "^4.4.2",
    "babel-jest": "28.1.3",
    "babel-loader": "^8.2.5",
    "babel-plugin-styled-components": "1.10.7",
    "babel-plugin-transform-inline-environment-variables": "0.4.4",
    "cspell": "6.31.1",
    "cypress": "^10.7.0",
    "cypress-plugin-tab": "^1.0.5",
    "detox": "20.0.3",
    "env-cmd": "^10.1.0",
    "esbuild-loader": "3.0.1",
    "eslint": "8.15.0",
    "eslint-config-next": "13.0.0",
    "eslint-config-prettier": "8.1.0",
    "eslint-import-resolver-typescript": "3.5.1",
    "eslint-interactive": "^9.0.0",
    "eslint-plugin-cypress": "^2.10.3",
    "eslint-plugin-import": "2.26.0",
    "eslint-plugin-jest": "^26.5.3",
    "eslint-plugin-jsx-a11y": "6.6.1",
    "eslint-plugin-jsx-expressions": "1.3.1",
    "eslint-plugin-mdx": "^2.0.2",
    "eslint-plugin-react": "7.31.8",
    "eslint-plugin-react-hooks": "4.6.0",
    "eslint-plugin-react-native": "4.0.0",
    "eslint-plugin-react-native-a11y": "3.3.0",
    "eslint-plugin-testing-library": "^5.5.1",
    "husky": "^8.0.1",
    "jest": "28.1.3",
    "jest-canvas-mock": "^2.4.0",
    "jest-circus": "27.5.1",
    "jest-environment-jsdom": "28.1.3",
    "jest-launchdarkly-mock": "2.0.3",
    "jest-react-native": "18.0.0",
    "jest-sonar": "^0.2.12",
    "jose": "4.13.1",
    "lint-staged": "^12.4.1",
    "markdown-toc": "^1.2.0",
    "metro": "0.72.3",
    "metro-babel-register": "0.72.3",
    "metro-react-native-babel-preset": "0.72.3",
    "metro-react-native-babel-transformer": "0.72.3",
    "metro-resolver": "0.72.3",
    "nx": "15.0.13",
    "nx-ignore": "15.0.2",
    "openapi-typescript": "^5.4.0",
    "pino-pretty": "^9.0.0",
    "postcss-scss": "^4.0.5",
    "prettier": "2.7.1",
    "react-native-accessibility-engine": "^3.2.0",
    "react-native-config": "1.4.6",
    "react-native-monorepo-tools": "1.2.1",
    "react-test-renderer": "18.2.0",
    "remark-cli": "^11.0.0",
    "remark-frontmatter": "4.0.1",
    "remark-gfm": "^3.0.1",
    "remark-lint-list-item-indent": "^3.1.1",
    "remark-preset-lint-consistent": "^5.1.1",
    "remark-preset-lint-markdown-style-guide": "^5.1.2",
    "remark-preset-lint-recommended": "^6.1.2",
    "remark-preset-prettier": "^1.0.1",
    "snyk": "1.1081.0",
    "storybook-addon-swc": "^1.1.7",
    "storybook-i18next": "1.0.3",
    "stylelint": "^14.8.3",
    "stylelint-a11y": "^1.2.3",
    "stylelint-config-recommended": "^7.0.0",
    "stylelint-config-styled-components": "^0.1.1",
    "stylelint-processor-styled-components": "^1.10.0",
    "supertest": "6.3.2",
    "swc-loader": "0.1.15",
    "tamagui-loader": "1.7.7",
    "ts-jest": "28.0.8",
    "ts-node": "10.9.1",
    "tsconfig-paths-webpack-plugin": "4.0.1",
    "typescript": "4.8.4",
    "url-loader": "^4.1.1",
    "xml2js": "0.4.23",
    "zx": "^7.2.1"
  }
}
tinesoft commented 1 year ago

Humm...very weird 🤔

I'll try to reproduce and have a look. In the meantime if you can create and share a minimal repro project, that would be very helpful.

brendonanderson commented 1 year ago

If I attempt to create new everything I get a different error.

userid@laptop nxw % yarn create nx-workspace
yarn create v1.22.19
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Installed "create-nx-workspace@16.1.4" with binaries:
      - create-nx-workspace
[####################################################################] 68/68
 >  NX   Let's create a new workspace [https://nx.dev/getting-started/intro]

✔ Choose what to create                 · package-based
✔ Repository name                       · repo-name
✔ Enable distributed caching to make your CI faster · Yes

 >  NX   Creating your v16.1.4 workspace.

   To make sure the command works reliably in all environments, and that the preset is applied correctly,
   Nx will run "yarn install" several times. Please wait.

✔ Installing dependencies with yarn
✔ Successfully created the workspace: repo-name.
✔ NxCloud has been set up successfully

 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Nx CLI is not installed globally.

   This means that you might have to use "yarn nx" or "npx nx" to execute commands in the workspace.
   Run "yarn global add nx" or "npm install -g nx" to be able to execute command directly.

 >  NX   Distributed caching via Nx Cloud has been enabled

   In addition to the caching, Nx Cloud provides config-free distributed execution,
   UI for viewing complex runs and GitHub integration. Learn more at https://nx.app

   Your workspace is currently unclaimed. Run details from unclaimed workspaces can be viewed on cloud.nx.app by anyone
   with the link. Claim your workspace at the following link to restrict access.

   https://cloud.nx.app/orgs/workspace-setup?accessToken=MGNhMTRhOGEtYTkzOS00YTg5LWJhNzEtMTRhNjA3YTk5OGFlfHJlYWQtd3JpdGU=

   Done in 0.82s.

 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   First time using Nx? Check out this interactive Nx tutorial.

   https://nx.dev/tutorials/package-based-repo-tutorial

✨  Done in 84.61s.
userid@laptop nxw % yarn add @nxrocks/nx-spring-boot --dev
yarn add v1.22.19
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "@nxrocks/nx-spring-boot > @nxrocks/common@2.4.3" has unmet peer dependency "@nx/devkit@>=16.0.0".
warning "@nxrocks/nx-spring-boot > @nxrocks/common@2.4.3" has unmet peer dependency "@nx/workspace@>=16.0.0".
warning " > @nxrocks/nx-spring-boot@8.0.3" has unmet peer dependency "@nx/devkit@>=16.0.0".
warning " > @nxrocks/nx-spring-boot@8.0.3" has unmet peer dependency "@nx/workspace@>=16.0.0".
[4/4] 🔨  Building fresh packages...
success Saved lockfile.
success Saved 45 new dependencies.
info Direct dependencies
└─ @nxrocks/nx-spring-boot@8.0.3
info All dependencies
├─ @nxrocks/common@2.4.3
├─ @nxrocks/nx-spring-boot@8.0.3
├─ @oozcitak/dom@1.15.10
├─ @oozcitak/url@1.0.4
├─ ansi-colors@4.1.3
├─ argparse@1.0.10
├─ balanced-match@1.0.2
├─ big-integer@1.6.51
├─ binary@0.3.0
├─ bluebird@3.4.7
├─ brace-expansion@1.1.11
├─ buffer-indexof-polyfill@1.0.2
├─ buffers@0.1.1
├─ chainsaw@0.1.0
├─ concat-map@0.0.1
├─ core-util-is@1.0.3
├─ duplexer2@0.1.4
├─ enquirer@2.3.6
├─ esprima@4.0.1
├─ fs.realpath@1.0.0
├─ fstream@1.0.12
├─ glob@7.2.3
├─ graceful-fs@4.2.11
├─ inflight@1.0.6
├─ inherits@2.0.4
├─ isarray@1.0.0
├─ js-yaml@3.14.1
├─ listenercount@1.0.1
├─ minimatch@3.1.2
├─ minimist@1.2.8
├─ mkdirp@0.5.6
├─ node-fetch@2.6.11
├─ path-is-absolute@1.0.1
├─ process-nextick-args@2.0.1
├─ readable-stream@2.3.8
├─ rimraf@2.7.1
├─ safe-buffer@5.1.2
├─ setimmediate@1.0.5
├─ sprintf-js@1.0.3
├─ string_decoder@1.1.1
├─ tr46@0.0.3
├─ traverse@0.3.9
├─ util-deprecate@1.0.2
├─ webidl-conversions@3.0.1
└─ whatwg-url@5.0.0
✨  Done in 7.30s.
userid@laptop nxw % cd repo-name
userid@laptop repo-name % yarn nx g @nxrocks/nx-spring-boot:new my-api
yarn run v1.22.19
$ /Users/userid/projects/nxw/repo-name/node_modules/.bin/nx g @nxrocks/nx-spring-boot:new my-api

>  NX  Generating @nxrocks/nx-spring-boot:project

✔ What kind of project are you generating? · application
✔ Which build system would you like to use? · maven-project
✔ Which packaging would you like to use? · jar
✔ Which version of Java would you like to use? · 17
✔ Which language would you like to use? · java
✔ What groupId would you like to use? · com.example
✔ What artifactId would you like to use? · demo
✔ What package name would you like to use? · com.example.demo
✔ What is the project about? · demo api
✔ Skip code formatting support(using Spotless plugin)? (Y/n) · true

 >  NX   Cannot find module 'tslib'

   Require stack:
   - /Users/userid/projects/nxw/node_modules/@nxrocks/nx-spring-boot/src/generators/project/generator.js
   - /Users/userid/projects/nxw/repo-name/node_modules/nx/src/config/workspaces.js
   - /Users/userid/projects/nxw/repo-name/node_modules/nx/src/config/configuration.js
   - /Users/userid/projects/nxw/repo-name/node_modules/nx/src/utils/package-manager.js
   - /Users/userid/projects/nxw/repo-name/node_modules/nx/bin/init-local.js
   - /Users/userid/projects/nxw/repo-name/node_modules/nx/bin/nx.js
   Pass --verbose to see the stacktrace.

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
userid@laptop repo-name %
brendonanderson commented 1 year ago

Problem solved. It had to do with versions. I needed to use a compatible version of the spring boot plugin with the version of nx we are using.