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

Old project has weird graph problem #29496

Open
1 of 4 tasks
phihochzwei opened this issue Jan 1, 2025 · 2 comments
Open
1 of 4 tasks

Old project has weird graph problem #29496

phihochzwei opened this issue Jan 1, 2025 · 2 comments

Comments

@phihochzwei
Copy link

phihochzwei commented Jan 1, 2025

Current Behavior

I am currently facing several problem with migrating our project to the latest version. Mainly because the monorepo itself is seen as a lib.
When I start nx dep-graph the Monorepo is listed as a lib, with dependencies etc. etc. What is weird though is the fact that it only has dependency to 3 of 19 libs that live in our project.
When I create a fresh and new monorepo, this does occur. Unfortunately I am not able to pin down, how this problem occurs and how it could be solved.

Expected Behavior

Monorepo is not listed as a lib and therefore things like migrations work as expected.

GitHub Repo

No response

Steps to Reproduce

I have no idea how to reproduce it.

Nx Report

Node           : 22.6.0
OS             : darwin-arm64
Native Target  : aarch64-macos
npm            : 10.8.2

nx                 : 20.1.2
@nx/js             : 20.1.2
@nx/jest           : 20.1.2
@nx/eslint         : 20.1.2
@nx/workspace      : 20.1.2
@nx/angular        : 20.1.2
@nx/cypress        : 20.1.2
@nx/devkit         : 20.1.2
@nx/eslint-plugin  : 20.1.2
@nx/nest           : 20.1.2
@nx/node           : 20.1.2
@nx/plugin         : 20.1.2
@nx/storybook      : 20.1.2
@nx/web            : 20.1.2
@nx/webpack        : 20.1.2
typescript         : 5.5.3
---------------------------------------
Registered Plugins:
@nx/storybook/plugin
---------------------------------------
Community plugins:
@ngrx/component      : 18.1.1
@ngrx/effects        : 18.1.1
@ngrx/entity         : 18.1.1
@ngrx/router-store   : 18.1.1
@ngrx/schematics     : 18.1.1
@ngrx/signals        : 18.1.1
@ngrx/store          : 18.1.1
@ngrx/store-devtools : 18.1.1
@storybook/angular   : 8.3.5
ng-mocks             : 14.13.1
ng2-charts           : 6.0.1
---------------------------------------
Local workspace plugins:
         @deich-lib/workspace-plugin

Failure Logs

Package Manager Version

No response

Operating System

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

Additional Information

The monorepo was created in November 2021 with the latest version in that time and since then we constantly migrated to today

@francoisauclair911
Copy link

Could you share the following files?

  1. root package.json
  2. nx.json

Thank you

@phihochzwei
Copy link
Author

Sure

{ "cli": { "analytics": false, "packageManager": "npm" }, "tasksRunnerOptions": { "default": { "runner": "@nx/workspace/tasks-runners/default", "options": { "cacheableOperations": ["build-storybook", "build-storybook"] } } }, "generators": { "@nx/angular:application": { "style": "scss", "linter": "eslint", "unitTestRunner": "jest", "e2eTestRunner": "cypress", "strict": false }, "@nx/angular:library": { "linter": "eslint", "unitTestRunner": "jest" }, "@nx/angular:component": { "style": "scss" } }, "defaultProject": "storefront-dse", "$schema": "./node_modules/nx/schemas/nx-schema.json", "targetDefaults": { "build": { "dependsOn": ["^build"], "inputs": ["production", "^production"], "cache": true }, "build-storybook": { "inputs": [ "default", "^production", "{workspaceRoot}/.storybook/**/*", "{projectRoot}/.storybook/**/*", "{projectRoot}/tsconfig.storybook.json" ], "cache": true }, "@nx/jest:jest": { "inputs": ["default", "^default", "{workspaceRoot}/karma.conf.js"], "cache": true, "options": { "passWithNoTests": true }, "configurations": { "ci": { "ci": true, "codeCoverage": true } } }, "server": { "cache": true }, "@nx/eslint:lint": { "inputs": ["default", "{workspaceRoot}/.eslintrc.json"], "cache": true }, "@nx/angular:ng-packagr-lite": { "cache": true, "dependsOn": ["^build"], "inputs": ["production", "^production"] } }, "namedInputs": { "default": ["{projectRoot}/**/*", "sharedGlobals"], "sharedGlobals": [], "production": [ "default", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/jest.config.[jt]s", "!{projectRoot}/.eslintrc.json", "!{projectRoot}/.storybook/**/*", "!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)", "!{projectRoot}/tsconfig.storybook.json", "!{projectRoot}/src/test-setup.[jt]s" ] }, "parallel": 1, "nxCloudAccessToken": "NWMxYjk4NTItOTM0Yy00MTA1LTkyN2UtNzAyMGI0OWNkYWQ0fHJlYWQtd3JpdGU=", "defaultBase": "master", "plugins": [ { "plugin": "@nx/storybook/plugin", "options": { "buildStorybookTargetName": "build-storybook", "serveStorybookTargetName": "storybook", "testStorybookTargetName": "test-storybook", "staticStorybookTargetName": "static-storybook" } } ], "release": { "projects": ["*"] }, "useLegacyCache": true }

`{
"name": "deich-lib",
"version": "0.0.0",
"license": "MIT",
"engines": {
"node": "^22.0.0"
},

"private": true,
"dependencies": {
	"@angular-eslint/schematics": "^18.4.0",
	"@angular/animations": "18.2.10",
	"@angular/cdk": "18.2.11",
	"@angular/common": "18.2.10",
	"@angular/compiler": "18.2.10",
	"@angular/core": "18.2.10",
	"@angular/forms": "18.2.10",
	"@angular/google-maps": "^18.2.11",
	"@angular/material": "18.2.11",
	"@angular/platform-browser": "18.2.10",
	"@angular/platform-browser-dynamic": "18.2.10",
	"@angular/platform-server": "18.2.10",
	"@angular/router": "18.2.10",
	"@angular/service-worker": "18.2.10",
	"@angular/ssr": "18.2.11",
	"@contentful/rich-text-html-renderer": "^16.6.10",
	"@nestjs/cache-manager": "^2.2.2",
	"@nestjs/common": "10.3.7",
	"@nestjs/config": "^3.2.1",
	"@nestjs/core": "10.3.7",
	"@nestjs/event-emitter": "^2.0.4",
	"@nestjs/jwt": "^10.2.0",
	"@nestjs/mongoose": "^10.0.4",
	"@nestjs/passport": "^10.0.3",
	"@nestjs/platform-express": "10.3.7",
	"@nestjs/swagger": "7.3.1",
	"@ngrx/component": "18.1.1",
	"@ngrx/effects": "18.1.1",
	"@ngrx/entity": "18.1.1",
	"@ngrx/router-store": "18.1.1",
	"@ngrx/schematics": "18.1.1",
	"@ngrx/signals": "18.1.1",
	"@ngrx/store": "18.1.1",
	"@ngrx/store-devtools": "18.1.1",
	"@nx/angular": "20.1.2",
	"@sentry/angular": "^8.32.0",
	"@sentry/node": "^7.116.0",
	"@sentry/tracing": "^7.114.0",
	"@swc/helpers": "0.5.11",
	"angularx-qrcode": "^18.0.1",
	"bcryptjs": "^2.4.3",
	"cache-manager": "^5.2.3",
	"chart.js": "^4.4.3",
	"class-transformer": "^0.5.1",
	"class-validator": "^0.14.0",
	"compression": "^1.7.4",
	"contentful": "^10.11.5",
	"convert-source-map": "^1.9.0",
	"cors": "^2.8.5",
	"crypto-js": "^4.2.0",
	"express": "~4.19.2",
	"express-basic-auth": "^1.2.1",
	"helmet": "^5.1.1",
	"jest-fetch-mock": "^3.0.3",
	"jest-mock": "^29.7.0",
	"json-diff-ts": "^4.0.1",
	"localstorage-polyfill": "^1.0.1",
	"mongoose": "^6.12.7",
	"ng-mocks": "^14.13.0",
	"ng2-charts": "^6.0.1",
	"ngx-cookie-service": "18.0.0",
	"ngx-editor": "^15.3.0",
	"nodemailer": "^6.9.13",
	"object-hash": "^3.0.0",
	"passkit-generator": "^3.2.0",
	"passport": "^0.6.0",
	"passport-jwt": "^4.0.0",
	"passport-local": "^1.0.0",
	"pug": "^3.0.3",
	"redis": "^4.6.13",
	"reflect-metadata": "^0.1.13",
	"rxjs": "~7.5.0",
	"slugify": "^1.6.6",
	"snappyjs": "^0.7.0",
	"swagger-ui-express": "^4.6.3",
	"tmp": "^0.2.3",
	"tslib": "^2.3.0",
	"ua-parser-js": "^1.0.37",
	"zone.js": "0.14.10"
},
"devDependencies": {
	"@angular-devkit/architect": "0.1802.11",
	"@angular-devkit/build-angular": "18.2.11",
	"@angular-devkit/core": "18.2.11",
	"@angular-devkit/schematics": "18.2.11",
	"@angular-eslint/eslint-plugin": "^18.4.0",
	"@angular-eslint/eslint-plugin-template": "^18.4.0",
	"@angular-eslint/template-parser": "^18.4.0",
	"@angular/cli": "~18.2.11",
	"@angular/compiler-cli": "18.2.10",
	"@angular/language-service": "18.2.10",
	"@chromatic-com/storybook": "^1.6.1",
	"@contentful/rich-text-types": "^16.5.0",
	"@golevelup/ts-jest": "^0.5.0",
	"@mixer/webpack-bundle-compare": "^0.1.0",
	"@nestjs/schematics": "10.0.1",
	"@nestjs/testing": "10.0.5",
	"@nx/devkit": "20.1.2",
	"@nx/eslint": "20.1.2",
	"@nx/eslint-plugin": "20.1.2",
	"@nx/jest": "20.1.2",
	"@nx/js": "20.1.2",
	"@nx/nest": "20.1.2",
	"@nx/node": "20.1.2",
	"@nx/plugin": "20.1.2",
	"@nx/storybook": "20.1.2",
	"@nx/workspace": "20.1.2",
	"@schematics/angular": "18.2.0",
	"@sentry/webpack-plugin": "^2.16.1",
	"@storybook/addon-essentials": "^8.2.9",
	"@storybook/addon-interactions": "^8.2.9",
	"@storybook/addon-styling-webpack": "^1.0.0",
	"@storybook/angular": "^8.2.9",
	"@storybook/core-server": "^8.2.9",
	"@storybook/test": "^8.2.9",
	"@storybook/test-runner": "^0.19.1",
	"@swc-node/register": "1.10.9",
	"@swc/cli": "0.4.0",
	"@swc/core": "1.7.35",
	"@types/compression": "^1.7.2",
	"@types/cors": "^2.8.12",
	"@types/cron": "^2.0.0",
	"@types/crypto-js": "^4.2.2",
	"@types/express": "^4.17.16",
	"@types/google.maps": "^3.47.2",
	"@types/googlemaps": "^3.43.3",
	"@types/jasmine": "~4.0.0",
	"@types/jest": "29.5.12",
	"@types/node": "^18.16.9",
	"@types/nodemailer": "^6.4.14",
	"@types/object-hash": "^2.2.1",
	"@types/passport-jwt": "^3.0.6",
	"@types/passport-local": "^1.0.34",
	"@types/ua-parser-js": "^0.7.36",
	"@typescript-eslint/eslint-plugin": "7.16.1",
	"@typescript-eslint/parser": "7.16.1",
	"@typescript-eslint/utils": "7.16.1",
"@scayle/storefront-api": "17.10.0",
	"autoprefixer": "^10.4.0",
	"browser-sync": "^3.0.0",
	"caniuse-lite": "1.0.30001303",
	"eslint": "8.57.0",
	"eslint-config-prettier": "9.1.0",
	"eslint-plugin-rxjs": "^5.0.3",
	"eslint-plugin-storybook": "^0.8.0",
	"eslint-plugin-unused-imports": "3.2.0",
	"git-commit-info": "^2.0.2",
	"husky": "^8.0.0",
	"jasmine-core": "~4.2.0",
	"jasmine-spec-reporter": "~7.0.0",
	"jest": "29.7.0",
	"jest-environment-jsdom": "29.7.0",
	"jest-environment-node": "^29.4.1",
	"jest-html-reporters": "^3.1.4",
	"jest-preset-angular": "14.1.1",
	"jsonc-eslint-parser": "^2.1.0",
	"karma": "~6.4.0",
	"karma-chrome-launcher": "~3.1.0",
	"karma-coverage": "~2.2.0",
	"karma-jasmine": "~5.1.0",
	"karma-jasmine-html-reporter": "~2.0.0",
	"lighthouse": "^12.1.0",
	"lint-staged": "^15.2.0",
	"ng-packagr": "18.2.0",
	"nx": "20.1.2",
	"postcss": "^8.4.5",
	"postcss-import": "14.1.0",
	"postcss-preset-env": "7.5.0",
	"postcss-url": "10.1.3",
	"prettier": "3.3.3",
	"sonar-scanner": "^3.1.0",
	"source-map-explorer": "^2.5.2",
	"storybook": "^8.2.9",
	"ts-jest": "29.1.0",
	"ts-node": "10.9.1",
	"typescript": "5.5.3",
	"webpack": "^5.91.0",
	"webpack-bundle-analyzer": "^4.10.2"
},
"lint-staged": {
	"**/*.ts": [
		"eslint --fix",
		"prettier --write"
	],
	"*.html": "prettier",
	"*.scss": "prettier --write"
}

}
`

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

No branches or pull requests

2 participants