nx: nx migrate Cannot find module @angular-devkit/architect
I’m trying to migrate from 11.0 to 11.2.
I’m getting following error:
Running migration rename-workspace-schematic-script
Cannot find module '@angular-devkit/architect'
Require stack:
- /private/var/folders/qg/mf99k0fs14g8sptzqrsp0_nr0000gn/T/tmp-5948XY2ZBOgXzEfX/node_modules/@nrwl/tao/src/commands/ngcli-adapter.js
- /private/var/folders/qg/mf99k0fs14g8sptzqrsp0_nr0000gn/T/tmp-5948XY2ZBOgXzEfX/node_modules/@nrwl/tao/src/commands/migrate.js
- /private/var/folders/qg/mf99k0fs14g8sptzqrsp0_nr0000gn/T/tmp-5948XY2ZBOgXzEfX/node_modules/@nrwl/tao/index.js
Command failed: /var/folders/qg/mf99k0fs14g8sptzqrsp0_nr0000gn/T/tmp-5948XY2ZBOgXzEfX/node_modules/.bin/tao migrate --run-migrations=migrations.json
I tried to add the package to the dev dependencies, but it did not change anything.
Environment:
Node : 14.15.4
OS : darwin x64
npm : 6.14.11
nx : Not Found
@nrwl/angular : 11.2.0
@nrwl/cli : 11.2.0
@nrwl/cypress : 11.2.0
@nrwl/devkit : 11.2.0
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : Not Found
@nrwl/jest : 11.2.0
@nrwl/linter : 11.2.0
@nrwl/nest : 11.2.0
@nrwl/next : Not Found
@nrwl/node : 11.2.0
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 11.2.0
@nrwl/web : Not Found
@nrwl/workspace : 11.2.0
typescript : 4.0.5
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 33 (5 by maintainers)
You should know I’m experiencing the same problem too. btw, in case someone is curious, I’m vegan!
Leaving a comment to keep the issue alive. @FrozenPandaz could you take another look at this?
I’m having a similar issue with latest Nx version (12.3.4). In my case the error comes up when trying to run the
@nrwl/react-native:startbuilder:As far as I can tell, the root cause of the error is that
@nrwl/taouses@angular-devkit/architectwithout declaring it as dependency. The code that imports@angular-devkit/architectis located inngcli-adapter.ts:https://github.com/nrwl/nx/blob/c71137f34cd687f6b38b96d60c9b7b17deacdf17/packages/tao/src/commands/ngcli-adapter.ts#L39-L43
Resolved this with below npm installation npm install --save-dev @angular-devkit/architect
This still happens in 15.0.0 while I’m trying to run e2e tests with @nrwl/cypress leveraging a library built with @nrwl/js:tsc
package.json:
Project is not an Angular application.
I woulder why @angular-devkit/architect is a dependency for my project since I haven’t use angular, I’m using react!
Same issue here with v12
@FrozenPandaz I fixed the problem doing this
I think it was fixed but the issue occurs again.
@FrozenPandaz bumping this issue because in latest version 11.4.0 the dependencies for @angular-devkit/architect were removed once again in this commit.
This should be fixed in version
11.2.5please try again with that version.EDIT: For me, the problem was that the @angular-devkit/architect’s init has not been fired automatically (I do not know if t needs to start automatically, or the problem was that the package was alread installed globally). So I had to execute: nx g @nrwl/angular:init After this, it worked.
Same issue here, when following official nx mfe guide (https://nx.dev/l/a/guides/setup-mfe-with-angular)
I hit this today migrating from
11.2.12to11.5.2. Any updates @FrozenPandaz and @vsavkin?It ran fine after migrating, but that is because it still existed in
node_modules. However, once clearing it out I encountered the failure. Should the dependency be restored in the commit mentioned by @noviadi, or do developers need to manually added it to their project?