Description of the problem:
I've tried to run npx cap init which failed due to missing node-gyp. I followed the installation instruction (windows-build-tools for node-gyp) but now when I try to run npx cap I get an error - "command not found: cap"
Affected platform
N/A
OS of the development machine
I'm using Windows 10 Version (10.0.17763 Build 17763)
Other information:
Tried using git bash / cmd
Capacitor version:
N/A
node version:
node 10.5
npm version:
npm 6.1
CocoaPods version:
N/A (cocopods is mac only?)
Steps to reproduce:
Link to sample project:
Can you check if @capacitor/cli is installed on the project you are running the npx cap command?
I thought I did, seems to work now - though I was under the impression that npx installs library if needed? Anyhow thanks
It does both things, install the library if needed or executes local executables, but in this case it鈥檚 required to be installed.
Notice that for create command, as it creates a new app, you use npx before installing the cli, but you use the library name instead of the executable name
npx @capacitor/cli create
That creates a new project and installs @capacitor/core and @capacitor/cli on it.
Most helpful comment
It does both things, install the library if needed or executes local executables, but in this case it鈥檚 required to be installed.
Notice that for create command, as it creates a new app, you use npx before installing the cli, but you use the library name instead of the executable name
npx @capacitor/cli create
That creates a new project and installs @capacitor/core and @capacitor/cli on it.