function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bobnunny1bobnunny1 

Get Started with Hybrid Development ERROR

Trying this Trailhead exercise, but when I try to create the FORCEDROID, after answering the prompts, I get the below error after "Saving android@~6.1.2 into config.xml file".  Any ideas?

forcedroid failed

Command failed: cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin#v5.1.0 --force
Error: Failed to fetch plugin https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin#v5.1.0 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963228 Error output:
npm ERR! addLocal Could not install C:\Users\robertn\AppData\Local\Temp\npm-7184-bd5e8d4a\git-cache-83631921\24a997d4581941c692b26ba
e755b2c5360fff306
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "https
://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin#v5.1.0" "--save"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR! syscall read

npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\robertn\TrailheadHybridApps\node_modules\npm-debug.log
Vimal VermaVimal Verma
I faced the same problem on iOS, below steps fixed my problem - 
1. Downgrade Cordova to 6.4.0
2. If SalesforceMobileSDK-CordovaPlugin download stills gives issues, then go to your app folder and download it manually: cordova plugin add [git link]
3. Observed that www/bootconfig.json file is missing from app, so copy it from the tmp folder and update it with key and url