nxtend-team / nxtend

MIT License
190 stars 41 forks source link

Cannot find module '@angular-devkit/architect' #409

Open redmagic opened 3 years ago

redmagic commented 3 years ago

When adding android to a fresh project, the cap builder complains about a missing dependency.

command: nx run mobile-example:add:android

error: Cannot find module '@angular-devkit/architect'

It should probably start using @angular/cli?

Installing the missing dependency works as a workaround.

devinshoemaker commented 3 years ago

Hmm, that shouldn't be the case. Do you have an angular.json or a workspace.json in the root of your workspace?

redmagic commented 3 years ago

Hi, I have an angular.json, no workspace.json.

Steps taken:

image

devinshoemaker commented 3 years ago

What version of Nx are you using? And what version of Nxtend are you using? This worked fine for me on the latest version of Nx and Nxtend. If you are running the latest version, could you provide me with a repo that reproduces this?

redmagic commented 3 years ago

Nx 11.0.20 and Nxtend 11.1.0.

Please do not spend too much time on this as we have a workaround. Considering your comment, this will most likely dissappear once we bump versions again.

devinshoemaker commented 3 years ago

Sounds good, I'll keep this open for now. If you still have issues then feel free to respond back ok this issue, otherwise I'll close it in a couple weeks.

redmagic commented 3 years ago

Hi, just occurred again.

I think the problem is here: https://github.com/nxtend-team/nxtend/blob/041a61bb9b78ce514df4c5bf5cd5d39e98689709/packages/capacitor/src/builders/cap/builder.ts#L5

devinshoemaker commented 3 years ago

Thanks for the update. I did some testing this morning and I'm running into similar issues. For now you could probably install @nrwl/angular as a dev dependency until I get a proper fix out, and then you should be able to remove it. Out of curiosity, are you using the Ionic React plugin?

redmagic commented 3 years ago

I'm not using Ionic React, it's an NX monorepo with Angular stack. We use only one self written plugin sofar. Thanks for looking into this.

devinshoemaker commented 3 years ago

Can you update to the latest version of my plugins and try again? I should have a fix out for this.