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

Updating "@nrwl/cli": "13.4.5" to "nx": "19.8.4" #30279

Open
4 tasks
vikrant-sahoo-ng opened this issue Mar 5, 2025 · 0 comments
Open
4 tasks

Updating "@nrwl/cli": "13.4.5" to "nx": "19.8.4" #30279

vikrant-sahoo-ng opened this issue Mar 5, 2025 · 0 comments

Comments

@vikrant-sahoo-ng
Copy link

Current Behavior

Hello folks, My project is using "@nrwl/cli": "13.4.5" now we want to upgrade it to latest nx version. I am doing incremental updates but after nx 16 I am keep getting following error -

nx migrate --run-migrations --force
node:internal/modules/cjs/loader:1228
throw err;
^
Error: Cannot find module '@nrwl/workspace/src/command-line/supported-nx-commands'
Require stack:

  • C:\Code\UI\nx\upgrade\nxUnderwritingTools\node_modules@nrwl\cli\lib\init-local.js
  • C:\Code\UI\nx\upgrade\nxUnderwritingTools\node_modules@nrwl\cli\bin\nx.js
  • C:\Users\vikrant.sahoo\AppData\Roaming\npm\node_modules@nrwl\cli\lib\init-global.js
  • C:\Users\vikrant.sahoo\AppData\Roaming\npm\node_modules@nrwl\cli\bin\nx.js

Even after clearing cache remove node_modules I am still getting this error. I have not found any solution in nx.dev, I have attached my package.json for reference . any help or guidance will be much appreciated.

@bbarba-nx @brian-nrwl @PhillipDNrwl

package.json
{ "name": "nx-underwriting-tools", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "nx", "postinstall": "node ./decorate-angular-cli.js && ngcc --properties es2015 browser module main", "start": "nx serve", "build": "nx build", "test": "nx test --code-coverage --detectOpenHandles", "lint": "nx workspace-lint && nx lint", "e2e": "nx e2e", "affected:apps": "nx affected:apps", "affected:libs": "nx affected:libs", "affected:build": "nx affected:build", "affected:e2e": "nx affected:e2e", "affected:test": "nx affected:test", "affected:lint": "nx affected:lint", "affected:dep-graph": "nx affected:dep-graph", "affected": "nx affected", "format": "nx format:write", "format:write": "nx format:write", "format:check": "nx format:check", "update": "nx migrate latest", "workspace-generator": "nx workspace-generator", "dep-graph": "nx dep-graph", "help": "nx help", "prettier": "prettier --check **/*.{js,ts,html,css}", "prettier-write": "prettier --write **/*.{js,ts,html,css}" }, "private": true, "dependencies": { "@angular/animations": "^14.2.8", "@angular/common": "^14.2.8", "@angular/compiler": "^14.2.8", "@angular/core": "^14.2.8", "@angular/forms": "^14.2.8", "@angular/localize": "^14.2.8", "@angular/platform-browser": "^14.2.8", "@angular/platform-browser-dynamic": "^14.2.8", "@angular/router": "^14.2.8", "@ng-bootstrap/ng-bootstrap": "^6.2.0", "@nrwl/angular": "13.4.5", " "bootstrap": "^4.6.0", "lodash-es": "^4.17.20", "ng-multiselect-dropdown": "^0.2.3", "ngx-cookie-service": "^14.0.1", "rxjs": "~7.4.0", "tslib": "^2.0.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "^14.2.8", "@angular-eslint/eslint-plugin": "~13.0.1", "@angular-eslint/eslint-plugin-template": "~13.0.1", "@angular-eslint/template-parser": "~13.0.1", "@angular/cli": "^14.2.8", "@angular/compiler-cli": "^14.2.8", "@angular/language-service": "^14.2.8", "@nrwl/cli": "13.4.5", "@nrwl/eslint-plugin-nx": "13.4.5", "@nrwl/jest": "14.8.3", "@nrwl/linter": "13.4.5", "@nrwl/tao": "13.4.5", "@nrwl/workspace": "13.4.5", "@types/jest": "29.1.2", "@types/lodash-es": "^4.17.3", "@types/node": "14.14.33", "@typescript-eslint/eslint-plugin": "~5.3.0", "@typescript-eslint/parser": "~5.3.0", "eslint": "8.2.0", "eslint-config-prettier": "8.1.0", "jest": "29.1.2", "jest-junit": "^14.0.1", "jest-preset-angular": "12.2.2", "prettier": "^2.3.1", "ts-jest": "29.0.3", "typescript": "~4.8.4" } }

Expected Behavior

Migration should be successful

GitHub Repo

No response

Steps to Reproduce

Nx Report

node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module '@nrwl/workspace/src/command-line/supported-nx-commands'
Require stack:
- C:\Code\UI\nx\upgrade\nxUnderwritingTools\node_modules\@nrwl\cli\lib\init-local.js
- C:\Code\UI\nx\upgrade\nxUnderwritingTools\node_modules\@nrwl\cli\bin\nx.js
- C:\Users\vikrant.sahoo\AppData\Roaming\npm\node_modules\@nrwl\cli\lib\init-global.js
- C:\Users\vikrant.sahoo\AppData\Roaming\npm\node_modules\@nrwl\cli\bin\nx.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.initLocal (C:\Code\UI\nx\upgrade\nxUnderwritingTools\node_modules\@nrwl\cli\lib\init-local.js:12:33)
    at Object.<anonymous> (C:\Code\UI\nx\upgrade\nxUnderwritingTools\node_modules\@nrwl\cli\bin\nx.js:12:18)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Code\\UI\\nx\\upgrade\\nxUnderwritingTools\\node_modules\\@nrwl\\cli\\lib\\init-local.js',
    'C:\\Code\\UI\\nx\\upgrade\\nxUnderwritingTools\\node_modules\\@nrwl\\cli\\bin\\nx.js',
    'C:\\Users\\vikrant.sahoo\\AppData\\Roaming\\npm\\node_modules\\@nrwl\\cli\\lib\\init-global.js',
    'C:\\Users\\vikrant.sahoo\\AppData\\Roaming\\npm\\node_modules\\@nrwl\\cli\\bin\\nx.js'
  ]
}

Node.js v20.18.3

Failure Logs

Package Manager Version

No response

Operating System

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

Additional Information

No response

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

1 participant