nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.29k stars 2.32k forks source link

build error in nx version 14.5.4 #11543

Closed Krasnov8953 closed 2 years ago

Krasnov8953 commented 2 years ago

I migrated my angular-cli project to nx workspace, my steps:

Expected Behavior

Building affected app

Failure Logs

    >  NX   Affected criteria defaulted to --base=feature/nx --head=HEAD

 >  NX   Ran target build for 9 projects (25ms)

         With additional flags:
           --verbose=true

    √    0/0 succeeded [0 read from cache]

    ×    0/0 targets failed, including the following:

 >  NX   Unable to resolve @angular-devkit/build-ng-packagr:build.

   Cannot find module '@angular-devkit/build-ng-packagr'
   Require stack:
   - \node_modules\nx\src\utils\package-json.js
   - \node_modules\nx\src\utils\package-manager.js
   - \node_modules\nx\bin\init-local.js
   - \node_modules\nx\bin\nx.js

Error: Unable to resolve @angular-devkit/build-ng-packagr:build.
Cannot find module '@angular-devkit/build-ng-packagr'
Require stack:
- \node_modules\nx\src\utils\package-json.js
- \node_modules\nx\src\utils\package-manager.js
- \node_modules\nx\bin\init-local.js
- \node_modules\nx\bin\nx.js
    at Workspaces.readExecutor (\node_modules\nx\src\config\workspaces.js:117:19)
    at getExecutorForTask (\node_modules\nx\src\tasks-runner\utils.js:133:22)
    at getCustomHasher (\node_modules\nx\src\tasks-runner\utils.js:137:21)
    at TasksSchedule.<anonymous> (\node_modules\nx\src\tasks-runner\tasks-schedule.js:114:62)
    at Generator.next (<anonymous>)
    at \node_modules\tslib\tslib.js:117:75
    at new Promise (<anonymous>)
    at Object.__awaiter (\node_modules\tslib\tslib.js:113:16)
    at TasksSchedule.hashTask (\node_modules\nx\src\tasks-runner\tasks-schedule.js:113:24)
    at TasksSchedule.<anonymous> (\node_modules\nx\src\tasks-runner\tasks-schedule.js:61:24)

Environment

 >  NX   Report complete - copy this into the issue template

   Node : 16.16.0
   OS   : win32 x64
   npm  : 8.11.0

   nx : 14.5.4
   @nrwl/angular : Not Found
   @nrwl/cypress : Not Found
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.5.4
   @nrwl/eslint-plugin-nx : Not Found
   @nrwl/express : Not Found
   @nrwl/jest : 14.5.4
   @nrwl/js : Not Found
   @nrwl/linter : 14.5.4
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : Not Found
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : Not Found
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : Not Found
   @nrwl/web : Not Found
   @nrwl/workspace : 14.5.4
   typescript : 4.6.3
   ---------------------------------------
   Community plugins:
         @ngrx/effects: 14.1.0
         @ngrx/store: 14.1.0
         @ngrx/store-devtools: 14.1.0
         rxjs: 6.6.7
AgentEnder commented 2 years ago

Migrating from angular cli should use ng add @nrwl/angular, can you try that and see if you get any errors?

Here are the docs: https://nx.dev/migration/migration-angular

Krasnov8953 commented 2 years ago

Yeah, that was a point, ng add @nrwl/angular was failed with unsupported build executors, thanks.

github-actions[bot] commented 1 year ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.