From 5ab3d370fc074ed4639edbf334fd25660a18cc69 Mon Sep 17 00:00:00 2001 From: blackholegalaxy Date: Tue, 20 Sep 2022 11:20:07 -0400 Subject: [PATCH 1/2] fix(capacitor): specify @capacitor/cli in npx command --- packages/capacitor/src/executors/cap/executor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/capacitor/src/executors/cap/executor.ts b/packages/capacitor/src/executors/cap/executor.ts index 3f443292..9ffc0b5b 100644 --- a/packages/capacitor/src/executors/cap/executor.ts +++ b/packages/capacitor/src/executors/cap/executor.ts @@ -15,7 +15,7 @@ export default async function runExecutor( const runCommandsOptions: RunCommandsBuilderOptions = { cwd: projectRootPath, - command: `npx cap ${cmd}`, + command: `npx --package=@capacitor/cli cap ${cmd}`, }; return await runCommands(runCommandsOptions, context); From 347f3805d04ebd74081b281ba0ae35b423a2a0a2 Mon Sep 17 00:00:00 2001 From: blackholegalaxy Date: Tue, 20 Sep 2022 12:01:45 -0400 Subject: [PATCH 2/2] docs(capacitor): update documentation to reflect npx package definition --- apps/docs/docs/ionic-angular/capacitor.md | 2 +- apps/docs/docs/ionic-react/capacitor.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/docs/docs/ionic-angular/capacitor.md b/apps/docs/docs/ionic-angular/capacitor.md index 6f061947..515de100 100644 --- a/apps/docs/docs/ionic-angular/capacitor.md +++ b/apps/docs/docs/ionic-angular/capacitor.md @@ -4,7 +4,7 @@ title: Capacitor sidebar_label: Capacitor --- -By default, [Capacitor](https://capacitorjs.com/) is configured for a newly generated project. Typically you execute Capacitor commands with `ionic capacitor ...` or `npx cap ...`. However, due to the way that Nx works, the Capacitor commands go through the Nx CLI. +By default, [Capacitor](https://capacitorjs.com/) is configured for a newly generated project. Typically you execute Capacitor commands with `ionic capacitor ...` or `npx --package=@capacitor/cli cap ...`. However, due to the way that Nx works, the Capacitor commands go through the Nx CLI. ## Add Native Platform diff --git a/apps/docs/docs/ionic-react/capacitor.md b/apps/docs/docs/ionic-react/capacitor.md index 6f061947..515de100 100644 --- a/apps/docs/docs/ionic-react/capacitor.md +++ b/apps/docs/docs/ionic-react/capacitor.md @@ -4,7 +4,7 @@ title: Capacitor sidebar_label: Capacitor --- -By default, [Capacitor](https://capacitorjs.com/) is configured for a newly generated project. Typically you execute Capacitor commands with `ionic capacitor ...` or `npx cap ...`. However, due to the way that Nx works, the Capacitor commands go through the Nx CLI. +By default, [Capacitor](https://capacitorjs.com/) is configured for a newly generated project. Typically you execute Capacitor commands with `ionic capacitor ...` or `npx --package=@capacitor/cli cap ...`. However, due to the way that Nx works, the Capacitor commands go through the Nx CLI. ## Add Native Platform