Giter Site home page Giter Site logo

cordova-cli's Introduction

Cordova CLI

NPM

Node CI codecov.io

The command line tool to build, deploy and manage Cordova-based applications.

Apache Cordova allows for building native mobile applications using HTML, CSS and JavaScript. This tool helps with management of multi-platform Cordova applications as well as Cordova plugin integration.

Installation

In your command-line on Windows:

    c:\> npm install -g cordova

In your terminal on Mac OS X/Linux:

    $sudo npm install -g cordova

Creating a new Cordova project

This simple example demonstrates how Cordova CLI can be used to create a myApp project with the camera plugin and run it for android platform:

    cordova create myApp com.myCompany.myApp myApp
    cd myApp
    cordova plugin add cordova-plugin-camera --save
    cordova platform add android --save
    cordova requirements android
    cordova build android --verbose
    cordova run android

Docs

Contributing

Cordova is an open source Apache project and contributors are needed to keep this project moving forward. Learn more on how to contribute on our website.

Reporting Issues

If you find issues with the Cordova CLI, please follow our guidelines for reporting issues. Please bear in mind that most of cordova-cli's functionality is implemented in cordova-lib, so that could be the place to report your issue. Platform-specific issues should be reported in the relevant repositories, such as cordova-android and cordova-ios.

cordova-cli's People

Contributors

agrieve avatar audreyso avatar bennmapes avatar brianleroux avatar bshepherdson avatar clelland avatar cmarcelk avatar csantanapr avatar dblotsky avatar dpogue avatar erisu avatar filmaj avatar gorkem avatar imhotep avatar jlongster avatar jsoref avatar kamrik avatar ldeluca avatar lorinbeer avatar mmocny avatar mreinstein avatar mwbrooks avatar nikhilkh avatar omefire avatar purplecabbage avatar raphinesse avatar sgrebnov avatar shazron avatar stevengill avatar vladimir-kotikov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-cli's Issues

New command `cordova outdated`

... which is just npm outdated filtered down to only include platforms and plugins that are relevant to Cordova, not other Framework packages or similar.

This enables us to tell people to just run cordova outdated to learn what they have to update to get to a current state of all their libraries.

Failed to fetch platform

Cordova version: 7.0.1 and 7.1.0
Last time build app was on 09.10.18.
But now when running npx cordova platform add [email protected], I'm getting following error:

Error: Failed to fetch platform [email protected]
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm WARN package.json [email protected] No repository   ##field.
npm WARN package.json [email protected] No README data
npm ERR! Darwin 18.0.0
npm ERR! argv "/usr/local/bin/node" "/PATH/node_modules/.bin/npm" "install" "[email protected]" "--save"
npm ERR! node v8.12.0
npm ERR! npm  v2.15.12
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!

Found that ticket of acorn package.

Any work around?

Package.json is being modified after cordova build android

Description:
I work in a windows environment with vscode where all files need to end with CRLF , so this configs are made:

  • .editorconfig the end_of_line property is set to crlf
  • git uses crlf
  • .prettierrc has "endOfLine": "crlf"
  • vscode config has "files.eol": "\r\n" and "prettier.endOfLine": "crlf"

All work as expected except for when you build (or run) the project on device. > cordova build android the package.json file is edited and stripped from the last empty line. That leads git say changes where made and the tree is not clean.

Steps to Reproduce:

  • Make a clean cordova project (or if you use Ionic as I do, then an ionic empty project)
  • Set eol to crlf
  • Add platform Android
  • Make sure package.json has a empty new line in the end.
  • Run cordova build android

Output:
image

I had this problem with cordova version 8.0.0 and right now with 8.1.2

Edit: As per this comment, this problem also happens in iOS

CLI 8.0.1-dev ([email protected]): Can't install plugin when adding platform android to helloword project

When running CLI from master with linked cordova-lib from master:

C:\Projects\throwaway\mobilespecAndroid  ([email protected])                                                                                                                                                     
λ cordova platform add https://github.com/apache/cordova-android --verbose                                                                                                                                      
Warning: using prerelease version 8.0.1-dev ([email protected])                                                                                                                                             
No scripts found for hook "before_platform_add".                                                                                                                                                                
Using cordova-fetch for https://github.com/apache/cordova-android                                                                                                                                               
fetch: Installing https://github.com/apache/cordova-android to C:\Projects\throwaway\mobilespecAndroid                                                                                                          
Running command: npm install https://github.com/apache/cordova-android --production --save                                                                                                                      
Command finished with error code 0: npm install,https://github.com/apache/cordova-android,--production,--save                                                                                                   
Removing "cordova-" prefix from cordova-android                                                                                                                                                                 
Warning: using prerelease platform [email protected].                                                                                                                                                           
Use 'cordova platform add android@latest' to add the latest published version instead.                                                                                                                          
Adding android project...                                                                                                                                                                                       
PlatformApi successfully found for platform android                                                                                                                                                             
Creating Cordova project for the Android platform:                                                                                                                                                              
        Path: platforms\android                                                                                                                                                                                 
        Package: io.cordova.hellocordova                                                                                                                                                                        
        Name: HelloCordova                                                                                                                                                                                      
        Activity: MainActivity                                                                                                                                                                                  
        Android target: android-27                                                                                                                                                                              
Copying android template project to platforms\android                                                                                                                                                           
Subproject Path: CordovaLib                                                                                                                                                                                     
Subproject Path: app                                                                                                                                                                                            
Android project created with [email protected]                                                                                                                                                          
Checking for any plugins added to the project that have not been installed in android platform                                                                                                                  
No differences found between plugins added to project and installed in android platform. Continuing...                                                                                                          
PlatformApi successfully found for platform android                                                                                                                                                             
Generating platform-specific config.xml from defaults for android at C:\Projects\throwaway\mobilespecAndroid\platforms\android\app\src\main\res\xml\config.xml                                                  
Merging project's config.xml into platform-specific android config.xml                                                                                                                                          
[Gradle Properties] Preparing Configuration                                                                                                                                                                     
[Gradle Properties] File missing, creating file with Cordova defaults.                                                                                                                                          
[Gradle Properties] Appended missing default: org.gradle.daemon=true                                                                                                                                            
[Gradle Properties] Appended missing default: org.gradle.jvmargs=-Xmx2048m                                                                                                                                      
[Gradle Properties] Appended missing default: android.useDeprecatedNdk=true                                                                                                                                     
[Gradle Properties] Updating and Saving File                                                                                                                                                                    
Merging and updating files from [www, platforms\android\platform_www] to platforms\android\app\src\main\assets\www                                                                                              
  mkdir platforms\android\app\src\main\assets\www\cordova-js-src                                                                                                                                                
  mkdir platforms\android\app\src\main\assets\www\cordova-js-src\android                                                                                                                                        
  copy  platforms\android\platform_www\cordova-js-src\android\nativeapiprovider.js platforms\android\app\src\main\assets\www\cordova-js-src\android\nativeapiprovider.js (new file)                             
  copy  platforms\android\platform_www\cordova-js-src\android\promptbasednativeapi.js platforms\android\app\src\main\assets\www\cordova-js-src\android\promptbasednativeapi.js (new file)                       
  copy  platforms\android\platform_www\cordova-js-src\exec.js platforms\android\app\src\main\assets\www\cordova-js-src\exec.js (new file)                                                                       
  copy  platforms\android\platform_www\cordova-js-src\platform.js platforms\android\app\src\main\assets\www\cordova-js-src\platform.js (new file)                                                               
  mkdir platforms\android\app\src\main\assets\www\cordova-js-src\plugin                                                                                                                                         
  mkdir platforms\android\app\src\main\assets\www\cordova-js-src\plugin\android                                                                                                                                 
  copy  platforms\android\platform_www\cordova-js-src\plugin\android\app.js platforms\android\app\src\main\assets\www\cordova-js-src\plugin\android\app.js (new file)                                           
  copy  platforms\android\platform_www\cordova.js platforms\android\app\src\main\assets\www\cordova.js (updated file)                                                                                           
  delete platforms\android\app\src\main\assets\www\img\cordova.png (no source)                                                                                                                                  
  copy  www\index.html platforms\android\app\src\main\assets\www\index.html (updated file)                                                                                                                      
  copy  www\js\index.js platforms\android\app\src\main\assets\www\js\index.js (updated file)                                                                                                                    
Wrote out android application name "HelloCordova" to C:\Projects\throwaway\mobilespecAndroid\platforms\android\app\src\main\res\values\strings.xml                                                              
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000                                                                                                    
Wrote out Android package name "io.cordova.hellocordova" to C:\Projects\throwaway\mobilespecAndroid\platforms\android\app\src\main\java\io\cordova\hellocordova\MainActivity.java                               
This app does not have launcher icons defined                                                                                                                                                                   
This app does not have splash screens defined                                                                                                                                                                   
This app does not have additional resource files defined                                                                                                                                                        
Prepared android project successfully                                                                                                                                                                           
No scripts found for hook "before_prepare".                                                                                                                                                                     
Checking config.xml and package.json for saved platforms that haven't been added to the project                                                                                                                 
Checking config.xml for saved plugins that haven't been added to the project                                                                                                                                    
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project                                                                                                                            
No scripts found for hook "before_plugin_add".                                                                                                                                                                  
Calling plugman.fetch on plugin "cordova-plugin-whitelist@1"                                                                                                                                                    
fetch: Installing cordova-plugin-whitelist@"1" to C:\Projects\throwaway\mobilespecAndroid                                                                                                                       
Running command: npm install cordova-plugin-whitelist@"1" --save                                                                                                                                                
Command finished with error code 1: npm install,cordova-plugin-whitelist@"1",--save                                                                                                                             
Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin cordova-plugin-whitelist@1 via registry.                              
Probably this is either a connection problem, or plugin spec is incorrect.                                                                                                                                      
Check your connection and plugin name/version/URL.                                                                                                                                                              
Error: npm: Command failed with exit code 1 Error output:                                                                                                                                                       
npm ERR! code EINVALIDTAGNAME                                                                                                                                                                                   
npm ERR! Invalid tag name ""1"": Tags may not have any characters that encodeURIComponent encodes.                                                                                                              
                                                                                                                                                                                                                
npm ERR! A complete log of this run can be found in:                                                                                                                                                            
npm ERR!     C:\Users\Jan\AppData\Roaming\npm-cache\_logs\2018-11-24T00_58_41_165Z-debug.log                                                                                                                    
Checking for any plugins added to the project that have not been installed in android platform                                                                                                                  
No differences found between plugins added to project and installed in android platform. Continuing...                                                                                                          
Generating platform-specific config.xml from defaults for android at C:\Projects\throwaway\mobilespecAndroid\platforms\android\app\src\main\res\xml\config.xml                                                  
Merging project's config.xml into platform-specific android config.xml                                                                                                                                          
[Gradle Properties] Preparing Configuration                                                                                                                                                                     
[Gradle Properties] Updating and Saving File                                                                                                                                                                    
Merging and updating files from [www, platforms\android\platform_www] to platforms\android\app\src\main\assets\www                                                                                              
  copy  platforms\android\platform_www\cordova-js-src\android\nativeapiprovider.js platforms\android\app\src\main\assets\www\cordova-js-src\android\nativeapiprovider.js (updated file)                         
  copy  platforms\android\platform_www\cordova-js-src\android\promptbasednativeapi.js platforms\android\app\src\main\assets\www\cordova-js-src\android\promptbasednativeapi.js (updated file)                   
  copy  platforms\android\platform_www\cordova-js-src\exec.js platforms\android\app\src\main\assets\www\cordova-js-src\exec.js (updated file)                                                                   
  copy  platforms\android\platform_www\cordova-js-src\platform.js platforms\android\app\src\main\assets\www\cordova-js-src\platform.js (updated file)                                                           
  copy  platforms\android\platform_www\cordova-js-src\plugin\android\app.js platforms\android\app\src\main\assets\www\cordova-js-src\plugin\android\app.js (updated file)                                       
  copy  platforms\android\platform_www\cordova.js platforms\android\app\src\main\assets\www\cordova.js (updated file)                                                                                           
  copy  www\index.html platforms\android\app\src\main\assets\www\index.html (updated file)                                                                                                                      
  copy  www\js\index.js platforms\android\app\src\main\assets\www\js\index.js (updated file)                                                                                                                    
Wrote out android application name "HelloCordova" to C:\Projects\throwaway\mobilespecAndroid\platforms\android\app\src\main\res\values\strings.xml                                                              
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000                                                                                                    
Wrote out Android package name "io.cordova.hellocordova" to C:\Projects\throwaway\mobilespecAndroid\platforms\android\app\src\main\java\io\cordova\hellocordova\MainActivity.java                               
This app does not have launcher icons defined                                                                                                                                                                   
This app does not have splash screens defined                                                                                                                                                                   
This app does not have additional resource files defined                                                                                                                                                        
Prepared android project successfully                                                                                                                                                                           
No scripts found for hook "after_prepare".                                                                                                                                                                      
Saving android@https://github.com/apache/cordova-android into platforms.json                                                                                                                                    
--save flag or autosave detected                                                                                                                                                                                
Saving android@https://github.com/apache/cordova-android into config.xml file ...                                                                                                                               
adding android to cordova.platforms array in package.json                                                                                                                                                       
No scripts found for hook "after_platform_add".     

The problem isolated:

Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project                                                                                                                            
No scripts found for hook "before_plugin_add".                                                                                                                                                                  
Calling plugman.fetch on plugin "cordova-plugin-whitelist@1"                                                                                                                                                    
fetch: Installing cordova-plugin-whitelist@"1" to C:\Projects\throwaway\mobilespecAndroid                                                                                                                       
Running command: npm install cordova-plugin-whitelist@"1" --save                                                                                                                                                
Command finished with error code 1: npm install,cordova-plugin-whitelist@"1",--save                                                                                                                             
Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin cordova-plugin-whitelist@1 via registry.                              
Probably this is either a connection problem, or plugin spec is incorrect.                                                                                                                                      
Check your connection and plugin name/version/URL.                                                                                                                                                              
Error: npm: Command failed with exit code 1 Error output:                                                                                                                                                       
npm ERR! code EINVALIDTAGNAME                                                                                                                                                                                   
npm ERR! Invalid tag name ""1"": Tags may not have any characters that encodeURIComponent encodes.                                                                                                              
                                                                                                                                                                                                                
npm ERR! A complete log of this run can be found in:                                                                                                                                                            
npm ERR!     C:\Users\Jan\AppData\Roaming\npm-cache\_logs\2018-11-24T00_58_41_165Z-debug.log

My npm:

λ npm -v
6.4.1

That "1" seems to come from https://github.com/apache/cordova-app-hello-world/blob/ebdd90811c78db284a3c82079f101940b31fc3ed/template_src/config.xml#L30 which was transformed into this package.json bit:

    "dependencies": {
        "cordova-android": "git+https://github.com/apache/cordova-android.git",
        "cordova-plugin-whitelist": "1"
    },

(I am pretty sure I saw that one before somewhere. I am just not 100% sure, so better report it here to the people that know the CLI)

Run command rewrites config.xml

While other command are expected to alter config.xml, run is not a command I would expect to change it.
When I edit config.xml to make the xml consistent or pretty I don't expect run to rewrite it.

cordova compile iOS does nothing

When I run cordova compile|build ios I get my build settings output to the terminal, then nothing. This just started happening after updating to Xcode 10. I have all the latest command line tools installed and I'm using cordova 8.0.0.

shell:$ cordova compile ios --verbose
No scripts found for hook "before_compile".
PlatformApi successfully found for platform ios
Reading build config file:
Building for iPhone XS Max Simulator
Building project: /Users/me/Projects/myApp/platforms/ios/myApp.xcworkspace
        Configuration: Debug
        Platform: emulator
Build settings from command line:
    CONFIGURATION_BUILD_DIR = /Users/me/Projects/myApp/platforms/ios/build/emulator
    SDKROOT = iphonesimulator12.0
    SHARED_PRECOMPS_DIR = /Users/me/Projects/myApp/platforms/ios/build/sharedpch

Build settings from configuration file '/Users/me/Projects/myApp/platforms/ios/cordova/build-debug.xcconfig':
    CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
    CODE_SIGN_ENTITLEMENTS = $(PROJECT_DIR)/$(PROJECT_NAME)/Entitlements-$(CONFIGURATION).plist
    CODE_SIGN_IDENTITY = iPhone Developer
    DEVELOPMENT_TEAM = BNCF67RW2H
    ENABLE_BITCODE = NO
    FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/OneSignal/iOS_SDK/OneSignalSDK/Framework"
    GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
    HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/OneSignal"
    OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/OneSignal"
    OTHER_LDFLAGS = $(inherited) -ObjC -framework "OneSignal" -framework "SystemConfiguration" -framework "UIKit" -framework "UserNotifications"
    PODS_BUILD_DIR = ${BUILD_DIR}
    PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
    PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
    PODS_ROOT = ${SRCROOT}/Pods
    SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h

No scripts found for hook "after_compile".

As you can see it dumps out the configuration then checks for an after compile hook. This happens whether I run cordova compile ios or cordova build ios

Improve `cordova info`

Ionic CLI's ionic info is one of its most useful commands. You just ask someone to run it in the project and post the output and you know (almost) all relevant versions, components used and even paths that are relevant.

An example:

λ ionic info

cli packages: (C:\nvm\v10.7.0\node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 2.0.2
    Cordova Platforms  : android 7.1.1 ios 4.5.5
    Ionic Framework    : ionic-angular 3.5.3

System:

    Android SDK Tools : 26.1.1
    Node              : v10.7.0
    npm               : 6.1.0
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Android

Misc:

    backend : pro

Compare that to the output of cordova info in the same project:

λ cordova info
Collecting Data...


Node version: v10.7.0

Cordova version: 8.0.0

Config.xml file:

<?xml version='1.0' encoding='utf-8'?>
<widget id="de...rstand" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Zählerstand</name>
    <description>A Zaehlerstand app.</description>
    <author email="[email protected]" href="https://janpiotrowski.de/">Jan Piotrowski</author>
    <content src="index.html" />
    <access origin="*" />
    <allow-navigation href="http://ionic.local/*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/[email protected]" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/[email protected]" width="80" />
        <icon height="120" src="resources/ios/icon/[email protected]" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/[email protected]" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/[email protected]" width="120" />
        <icon height="180" src="resources/ios/icon/[email protected]" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/[email protected]" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/[email protected]" width="152" />
        <icon height="167" src="resources/ios/icon/[email protected]" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/[email protected]" width="58" />
        <icon height="87" src="resources/ios/icon/[email protected]" width="87" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <icon height="57" src="resources\ios\icon\icon.png" width="57" />
        <icon height="114" src="resources\ios\icon\[email protected]" width="114" />
        <icon height="40" src="resources\ios\icon\icon-40.png" width="40" />
        <icon height="80" src="resources\ios\icon\[email protected]" width="80" />
        <icon height="120" src="resources\ios\icon\[email protected]" width="120" />
        <icon height="50" src="resources\ios\icon\icon-50.png" width="50" />
        <icon height="100" src="resources\ios\icon\[email protected]" width="100" />
        <icon height="60" src="resources\ios\icon\icon-60.png" width="60" />
        <icon height="120" src="resources\ios\icon\[email protected]" width="120" />
        <icon height="180" src="resources\ios\icon\[email protected]" width="180" />
        <icon height="72" src="resources\ios\icon\icon-72.png" width="72" />
        <icon height="144" src="resources\ios\icon\[email protected]" width="144" />
        <icon height="76" src="resources\ios\icon\icon-76.png" width="76" />
        <icon height="152" src="resources\ios\icon\[email protected]" width="152" />
        <icon height="167" src="resources\ios\icon\[email protected]" width="167" />
        <icon height="29" src="resources\ios\icon\icon-small.png" width="29" />
        <icon height="58" src="resources\ios\icon\[email protected]" width="58" />
        <icon height="87" src="resources\ios\icon\[email protected]" width="87" />
        <splash height="1136" src="resources\ios\splash\Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources\ios\splash\Default-667h.png" width="750" />
        <splash height="2208" src="resources\ios\splash\Default-736h.png" width="1242" />
        <splash height="1242" src="resources\ios\splash\Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources\ios\splash\Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources\ios\splash\Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources\ios\splash\Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources\ios\splash\Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources\ios\splash\Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources\ios\splash\Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources\ios\splash\Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources\ios\splash\Default~iphone.png" width="320" />
        <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
    </platform>
    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="19" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
    <feature name="StatusBar">
        <param name="ios-package" onload="true" value="CDVStatusBar" />
    </feature>
    <engine name="android" spec="^7.1.1" />
    <engine name="ios" spec="4.5.5" />
    <plugin name="cordova-plugin-app-version" spec="^0.1.9" />
    <plugin name="cordova-plugin-device" spec="1.1.4" />
    <plugin name="cordova-plugin-splashscreen" spec="~4.0.1" />
    <plugin name="cordova-plugin-statusbar" spec="2.2.1" />
    <plugin name="cordova-plugin-whitelist" spec="1.3.1" />
    <plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
    <plugin name="cordova-sqlite-storage" spec="^2.3.3" />
</widget>


Plugins:

.git,cordova-plugin-app-version,cordova-plugin-console,cordova-plugin-device,cordova-plugin-splashscreen,cordova-plugin-statusbar,cordova-plugin-whitelist,cordova-sqlite-storage,ionic-plugin-keyboard



Android platform:

**************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools\bin\sdkmanager.bat
and tools\bin\avdmanager.bat
**************************************************************************

Invoking "C:\Android\tools\bin\avdmanager" list target

Available Android targets:==============] 100% Fetch remote repository...
----------
id: 1 or "android-23"
     Name: Android API 23
     Type: Platform
     API level: 23
     Revision: 3
----------
id: 2 or "android-25"
     Name: Android API 25
     Type: Platform
     API level: 25
     Revision: 3
----------
id: 3 or "android-26"
     Name: Android API 26
     Type: Platform
     API level: 26
     Revision: 2
----------
id: 4 or "android-27"
     Name: Android API 27
     Type: Platform
     API level: 27
     Revision: 3
----------
id: 5 or "android-28"
     Name: Android API 28
     Type: Platform
     API level: 28
     Revision: 4

Error retrieving iOS platform information: Error: cmd: Command failed with exit code 1 Error output:
'xcodebuild' is not recognized as an internal or external command,
operable program or batch file.

While it may include the same information, cordova info is much less readable and also harder to copy from the command line.

Suggestion

Split cordova info into two commands: cordova info and cordova info --extended. The first outputs a short list of the most important information (what platforms, plugins, versions, npm+node, OS etc.) and the second one also includes the complete config.xml, Android targets information etc.

Modifying different attributes of same AndroidManifest.xml element in config.xml and plugin.xml results in conflict

Using [email protected], [email protected].

For example if config.xml contains:

<edit-config file="AndroidManifest.xml" target="/manifest/application" mode="merge">
  <application android:largeHeap="true" />
</edit-config>

And plugin.xml contains:

<edit-config file="AndroidManifest.xml" target="/manifest/application" mode="merge">
  <application android:usesCleartextTraffic="true" />
</edit-config>

Adding the plugin will fail with <edit-config> changes in this plugin conflicts with <edit-config> changes in config.xml.

Steps to reproduce

Using [email protected].

git clone https://github.com/lasselaakkonen/cordova-plugineditconfigissue
cd cordova-plugineditconfigissue
cordova platform add android
cordova plugin add cleartextplugin

Can't run fresh cordova app on ios simulator

I made a new cordova app with the following commands:

$ cordova create ct
Creating a new cordova project.
$ cd ct/
$ cordova platform add ios
Using cordova-fetch for cordova-ios@~4.5.4
Adding ios project...
Creating Cordova project for the iOS platform:
	Path: platforms/ios
	Package: io.cordova.hellocordova
	Name: HelloCordova
iOS project created with [email protected]
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Installing "cordova-plugin-whitelist" for ios
Adding cordova-plugin-whitelist to package.json
Saved plugin info for "cordova-plugin-whitelist" to config.xml
--save flag or autosave detected
Saving ios@~4.5.5 into config.xml file ...

Then started an iOS Simulator and waited for it to finish loading and be fully ready. Then:

$ cordova run ios
Building for iPhone X Simulator
Building project: /Users/shawn/git/shawninder/ct/platforms/ios/HelloCordova.xcworkspace
	Configuration: Debug
	Platform: emulator
Build settings from command line:
    CONFIGURATION_BUILD_DIR = /Users/shawn/git/shawninder/ct/platforms/ios/build/emulator
    SDKROOT = iphonesimulator12.1
    SHARED_PRECOMPS_DIR = /Users/shawn/git/shawninder/ct/platforms/ios/build/sharedpch

Build settings from configuration file '/Users/shawn/git/shawninder/ct/platforms/ios/cordova/build-debug.xcconfig':
    CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
    CODE_SIGN_ENTITLEMENTS = $(PROJECT_DIR)/$(PROJECT_NAME)/Entitlements-$(CONFIGURATION).plist
    CODE_SIGN_IDENTITY = iPhone Developer
    ENABLE_BITCODE = NO
    GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1
    HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" "$(BUILT_PRODUCTS_DIR)"
    OTHER_LDFLAGS = -ObjC
    SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h

No target specified for emulator. Deploying to iPhone-X, 12.1 simulator
/Users/shawn/git/shawninder/ct/platforms/ios/build/emulator/HelloCordova.app/Info.plist file not found.

And nothing happens in the simulator. Also perplexing is the fact that the /Users/shawn/git/shawninder/ct/platform/ios/build directory doesn't exist.

$ ls -la platforms/ios/
total 32
drwxr-xr-x  13 shawn  staff  416 31 Oct 16:25 .
drwxr-xr-x   3 shawn  staff   96 31 Oct 16:25 ..
-rw-r--r--   1 shawn  staff   53 31 Oct 16:25 .gitignore
drwxr-xr-x   7 shawn  staff  224 31 Oct 16:25 CordovaLib
drwxr-xr-x  14 shawn  staff  448 31 Oct 16:25 HelloCordova
drwxr-xr-x   3 shawn  staff   96 31 Oct 16:25 HelloCordova.xcodeproj
drwxr-xr-x   4 shawn  staff  128 31 Oct 16:25 HelloCordova.xcworkspace
drwxr-xr-x  26 shawn  staff  832 31 Oct 16:25 cordova
-rw-r--r--   1 shawn  staff  342 31 Oct 16:25 ios.json
drwxr-xr-x   5 shawn  staff  160 31 Oct 16:25 platform_www
-rw-r--r--   1 shawn  staff  860 31 Oct 16:25 pods-debug.xcconfig
-rw-r--r--   1 shawn  staff  859 31 Oct 16:25 pods-release.xcconfig
drwxr-xr-x   9 shawn  staff  288 31 Oct 16:25 www

Any idea what's going on?

About my setup:

$ cordova -v
8.1.2 ([email protected])
$ node -v
v8.10.0
$ npm -v
6.0.0

iOS Simulator version: Version 10.1 (SimulatorApp-877 CoreSimulator-572.2
xcode version: Version 10.1 (10B61)

Repos moved to Github

Previously, platforms were hosted by apache.org under https://git-wip-us.apache.org/repos/asf?p=cordova-PLATFORM.git. Cordova@nightly has updated these to use Github repos, but this change is not reflected in the latest stable release (8.1.2 / [email protected]). The old repos have since been removed, meaning I cannot install anything.

Manually doctoring the URLs in platformsConfig.json does not seem to work, the CLI keeps telling me no suitable platform can be found. Cordova@nightly also fails to install any platform (I had it working for cordova-browser yesterday evening, now no such luck).

Am I doing something wrong or did this simply break and should I wait for a new release that fixes it? If so, any ideas on a time path? Cordova is now effectively unusable for me.

Telemetry: Platforms and plugins usage and versions

One very interesting thing to know would be the platforms and plugins being used/installed (including version). This would enable much better decisions on how to handle platform and plugin updates, but also what users are still using out there and thus has to be supported.

It would enable us to build similar graphs to https://datastudio.google.com/reporting/0B-Ja5cNOX_XLTElHdWd4V2NUem8/page/jfJF for platforms, individual versions of platforms, plugins in general, or versions of specific plugins (e.g. core plugins).

CLI needs integration/e2e testing

We should add a suite of tests that test the different use cases of the CLI.

Currently this is only done implicitly via things like paramedic (which is used by all plugin CI) or mobile-spec (which is run manually on releases), which use the CLI to do things. But I doubt this really covers all the cases and probably mostly also only uses already release CLI versions.

"cordova platform add" fails to restore plugin *randomly*

cordova 8.0.0
node 8.11.1
npm 5.6.0

in our build process we call "cordova platform add android" which installs all plugins and the required platform before we build the project.

after i upgraded cordova to version 8.0.0 and all the plugins (and their dependencies) i always get an error when calling the platform add.

the error i get is:

Failed to restore plugin "cordova-plugin-camera" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin [email protected] via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module

it appears that changing the order of the plugins causes the same error to a different plugin!
node_modules is updated with the correct plugins.
installing the plugin manually via "cordova plugin add " pass successfully.

packageJson.txt
configXml.txt

Rewrite CLI using better options parser (possibly yargs)

Requirements

  • sub-command support
  • generate usage text from specification

AFAICT, nopt does not satisfy any of those, so let's look at some alternatives.

Disqualifications

That leaves us with yargs vs commander. Multiple reasons let me favor yargs:

  • Seemingly better docs
  • Faster growing download count (= popularity?)
  • Younger project
  • The pirate theme 😉

Related: #309

inconsistent behavior of --link flag during plugin add.

Hi,

When I add a plugin from local using --link as the documentation mentions, I notice that the plugins folder in the application base folder is a symlink. That is gud :) , but.....

At the platform_www/plugins 2 unexpected behaviour can happen:

  • if platform installed first & then plugin added: a copy of plugin used and not a symlink
  • if plugin installed first & then platform: any plugin added by --link is totally forgotten about & missing

cordova --version : 7.0.1
ios@~4.5.5
browser@~4.1.0

Is this is expected behaviour or an actual bug?

Thanks!

Cordova fails if space is present in path

Hi,

I have been struggling by this problem for hours. It seems that space in my windows user name causes this problem to happen. Im not really sure if this problem is android specific or not so i posted this problem here instead. Please see the screenshots i have attached below to understand my problem:

Normal adb devices command result:
screenshot_47

cordova run android initial result:
screenshot_48

cordova run android error message:
screenshot_49

I think by just adding " characters between the adb path should fix this problem but i cant do that with cordova cli. Please help.

NPM Won't Install Cordova

I cannot get NPM to install Cordova on Ubuntu 18.04. It constantly fails with a Failed to fetch error and a fail to unzip error. Here is the log.

sudo npm install -g cordova
npm ERR! tar.unpack error reading /tmp/npm-15556-da5c22ae/registry.npmjs.org/q/-/q-1.0.1.tgz
npm ERR! tar.unpack unzip error /tmp/npm-15556-da5c22ae/registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz
npm ERR! tar.unpack unzip error /tmp/npm-15556-da5c22ae/registry.npmjs.org/plist/-/plist-2.0.1.tgz
npm ERR! tar.unpack unzip error /tmp/npm-15556-da5c22ae/registry.npmjs.org/acorn/-/acorn-3.3.0.tgz
npm ERR! tar.unpack untar error /tmp/npm-15556-da5c22ae/registry.npmjs.org/acorn/-/acorn-3.3.0.tgz
npm ERR! fetch failed http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET

Add plugin each platform

It's possible to add different plugins each platform in the same config.xml?
I tried this but not fetched the plugin while is compile.

<platform name="ios">
	<plugin name="hu.dpal.phonegap.plugins.spinnerdialog" spec="https://github.com/Sharinglabs/SpinnerDialog.git#007f0c0"/>
</platform>

<platform name="android">
	<plugin name="cordova-plugin-spinner-dialog" spec="https://github.com/Paldom/SpinnerDialog.git#a9276f5" />
</platform>

Any help?

`cordova plugin remove` not cleaning `<js-module />` changes.

Don't know if it is a limitation or a lack of dependency tracking but:

cordova create plugtestapp-a com.test.plugtestapp PlugTestApp \
&& cd plugtestapp-a/ \
&& cordova platform add [email protected] \
&& cd .. \
&& cordova create plugtestapp-b com.test.plugtestapp PlugTestApp \
&& cd plugtestapp-b/ \
&& cordova plugin add cordova-plugin-local-notification \
&& cordova platform add [email protected] \
&& cordova plugin remove cordova-plugin-local-notification \
&& cd .. \
&& diff --recursive plugtestapp-a plugtestapp-b

Residual data in:

diff plugtestapp-a/platforms/android/platform_www/cordova_plugins.js plugtestapp-b/platforms/android/platform_www/cordova_plugins.js
diff plugtestapp-a/plugins/fetch.json plugtestapp-b/plugins/fetch.json

Don't know if it can cause issues on prepared platform while removing plugin with this but I think it could.
And developers are not prepared! At least the documentation should warn developers in order to always make a clean platform prepare before shipping release.

multiple issues in cordova requirements

cordova requirements has multiple issues: [Object object] output, outdated information and uncaught exceptions thrown when a requirement is not met (see screenshot).

screen shot 2018-09-21 at 10 28 47

MacOSX 10.12.6, Cordova 8.0.0

Set Default Apps Map

HI there, I have a link that direct to google map
href="geo:0,0?q=201%2BMassachusetts%2BAvenue,+Lexington,+MA,+02420".
since im install waze map it ask to use between two app. I want to set Google Map by default(in code not
in android platform). Thank..

Defining Content-Security-Policy parameters in order to get violation reports

Hello, I'm having some problems defining content security policy on my application due to reports of violations.
I need to have a report each time a csp violation occur. I followed your documentation at https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/#content-security-policy

On Android and iOS, the network request whitelist (see above) is not able to filter all types of requests (e.g.

But there is a problem, report-to and report-uri are not supported on <meta> tag (https://w3c.github.io/webappsec-csp/.

What am I supposed to do in this case? When an application is already bundled with all .html pages and does not communicate with the server?

cordova prepare does not call platform prepare hooks

If a prepare hook is defined in a platform block, it is not executed when cordova prepare is called without specifying a platform.

My expectation is that the platform prepare hooks will be still be called when a platform is not provided as an argument to the platform prepare command.

For example:

Given the following hook:

<platform name="android">
    <hook type="after_prepare" src="scripts/androidBeforeBuild.js" />
    ...
</platform>

When executing the command:

cordova prepare

the hook will not be found or executed.

However when executing the command:

cordova prepare android

the hook will be found and run as expected.

I have observed this for project and plugin hooks.

Is this behaviour by design? My thinking is that it is then always safer to run the platform prepare command with an explicit platform.

Thanks.

Collecting Data...


Node version: v8.10.0

Cordova version: 8.0.0

Cli package 8.x uses infected event-stream

event-stream 3.3.6 was pulled due to being infected with malicious code.

The 8.x series of cordova packages use this version of event-stream and are no longer installable.

-> % yarn global add cordova
yarn global v1.12.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.6.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Unexpected end of data"
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

Add plugin with private repository, keep reporting cordova error

Cordova-cli version : 8.0.0

I am using a private git repo to install my plugin. A type the following command and keep report error:
ionic cordova plugin add git+ssh://<private_repo>

while I install the same plugin using local file system, there is no such error.
Also if I downgrade my cordova-cli to version 6.5.0. the error has also gone and installed plugin successfully.

Please advise what should I do or check which part of my plugin to resolve problem ?

Error Stack:

node:97726) UnhandledPromiseRejectionWarning: CordovaError: Failed to fetch plugin git+ssh://<private_repo> via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://<private_repo>
npm ERR!
npm ERR! GitLab: The project you were looking for could not be found.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/zechs/.npm/_logs/2018-09-13T05_10_18_589Z-debug.log
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:173:37
at _rejected (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:864:24)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:890:30
at Promise.when (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:1142:31)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:808:41)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:624:44
at runSingle (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:137:13)
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:97726) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:97726) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Fixed/Freezed versions for plugins

Using cli version 7.1.0:

I want to use the version 8.0.3 for some library but when I use:

cordova plugin add [email protected] --save

The config.xml ends up with: instabug-cordova@^8.0.3 meaning that minor changes should be installed too, and at the end the version that the project try to use is 8.0.4 and not 8.0.3.

  • Is there any way to define fixed versioning on a dependency?
  • Why this always allow minor changes on versioning? this does not ends up with a dependency bug hell?

Failed to load iOS project file when running cordova via npm scripts (works for android)

I've got some npm scripts to make it easier to build and launch our android and ios apps. The android one is working great, but the ios one throws an error, but if I manually run the command it works. I'm guessing there is something in the ios builder / platform that is using the path of where I ran the script instead of pwd.

error message

Failed to load iOS project file. Maybe your Cordova version is not supported?

android command (working fine)

npm run build -- --mobile && pushd cordova/consumer && adb uninstall com.my.app && cordova prepare android && cordova run android && popd

ios command (throws error)

npm run build -- --mobile && ios-deploy --uninstall_only --bundle_id com.my.app && pushd cordova/consumer && cordova prepare ios && cordova run ios && popd

my work around

npm run build -- --mobile && ios-deploy --uninstall_only --bundle_id com.my.app && echo "to launch run: pushd cordova/consumer && cordova prepare ios && cordova run ios && popd"

This runs npm run build -- --mobile && ios-deploy --uninstall_only --bundle_id com.my.app

Then echos: to launch run: pushd cordova/consumer && cordova prepare ios && cordova run ios && popd

After the above runs if i simply copy/paste pushd cordova/consumer && cordova prepare ios && cordova run ios && popd it launchees without issue, but if npm runs it it fails with the error message above.

Apple-osx engine version undefined when installing plugin

I've a plugin which defines engine apple-osx

 <engine name="apple-osx" version=">=10.14.0" />

but when installing such plugin for 2 platforms (iOS and OSX) I receive following error

Failed to install 'cordova-plugin-local-notification': TypeError: Invalid Version: undefined
at new SemVer (/Users/tomec/.nvm/versions/node/v10.8.0/lib/node_modules/cordova/node_modules/semver/semver.js:305:11)
at Range.test (/Users/tomec/.nvm/versions/node/v10.8.0/lib/node_modules/cordova/node_modules/semver/semver.js:1112:15)
at Function.satisfies (/Users/tomec/.nvm/versions/node/v10.8.0/lib/node_modules/cordova/node_modules/semver/semver.js:1161:16)
at checkEngines (/Users/tomec/.nvm/versions/node/v10.8.0/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:116:20)
at /Users/tomec/.nvm/versions/node/v10.8.0/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:313:16
at _fulfilled (/Users/tomec/.nvm/versions/node/v10.8.0/lib/node_modules/cordova/node_modules/q/q.js:854:54)
at /Users/tomec/.nvm/versions/node/v10.8.0/lib/node_modules/cordova/node_modules/q/q.js:883:30
at Promise.promise.promiseDispatch (/Users/tomec/.nvm/versions/node/v10.8.0/lib/node_modules/cordova/node_modules/q/q.js:816:13)
at /Users/tomec/.nvm/versions/node/v10.8.0/lib/node_modules/cordova/node_modules/q/q.js:624:44
at runSingle (/Users/tomec/.nvm/versions/node/v10.8.0/lib/node_modules/cordova/node_modules/q/q.js:137:13)

Error is due to currentVersion: 'undefined' in parsed engine

{ 
    platform: 'ios',
    scriptSrc: '/Users/tomec/Projects/CordovaTest/platforms/ios/cordova/apple_osx_version',
    minVersion: '>=10.14.0',
    currentVersion: 'undefined',
    name: 'apple-osx' 
}

I've located problem down to script lib/versions.js which is called from script apple_osx_version. The problem is due to invalid RegEx var regexOSX = /^OS X \d+/; because now the output from xcodebuild -showsdks looks following:

macOS SDKs:
    macOS 10.14                   	-sdk macosx10.14

Changing RegEx to var regexOSX = /^macOS \d+/;fixed the problem.


Node version: v10.8.0
Cordova version: 8.1.1

CRLF in certain files being replaced with LF whenever we execute `cordova run browser`

We're all on Windows 10, and running Cordova 8.1.2 ([email protected]).

Whenever any of us run cordova run browser, all of the CRLF newlines* in config.xml and package.json are replaced with LF newlines. Nothing else is modified other than the newlines. To our knowledge we haven't modified any Cordova settings other than installing the android and browser platforms.

*Except for the CRLFs in the <description> field of config.xml

Executing cordova run browserwith --verbose:

No scripts found for hook "before_run".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform browser
Checking config.xml for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in browser platform
No differences found between plugins added to project and installed in browser platform. Continuing...
Generating config.xml from defaults for platform "browser"
Merging and updating files from [www, platforms\browser\platform_www] to platforms\browser\www
  delete platforms\browser\www\config.xml (no source)
  copy  platforms\browser\platform_www\manifest.json platforms\browser\www\manifest.json (updated file)
Executing script found in plugin cordova-plugin-browsersync for hook "after_prepare": plugins\cordova-plugin-browsersync\lib\pluginHook.js
No scripts found for hook "before_deploy".
No scripts found for hook "after_run".

Output of cordova platform ls

Installed platforms:
  android 7.1.1
  browser 5.0.4
Available platforms:
  ios ~4.5.4
  osx ~4.0.1
  windows ~6.0.0

CLI 8.0.1-dev ([email protected]) can't install local platforms (iOS, Android)

Currently fighting my way through https://github.com/apache/cordova-mobile-spec and using https://github.com/apache/cordova-coho to get everything locally - which means I am working with master of everything.

C:\Projects\throwaway\mobilespecAndroid  ([email protected])
λ cordova -v
8.0.1-dev ([email protected])

Now I am having problems with installing the Android platform from a local folder (../cordova-android is the master checkout of cordova-android):

C:\Projects\throwaway\mobilespecAndroid  ([email protected])
λ cordova platform add ../cordova-android --verbose
Warning: using prerelease version 8.0.1-dev ([email protected])
No scripts found for hook "before_platform_add".
fetch: Installing C:\Projects\throwaway\cordova-android to C:\Projects\throwaway\mobilespecAndroid
Running command: npm install C:\Projects\throwaway\cordova-android --production --save
Command finished with error code 0: npm install,C:\Projects\throwaway\cordova-android,--production,--save
Removing "cordova-" prefix from cordova-android
Warning: using prerelease platform [email protected].
Use 'cordova platform add android@latest' to add the latest published version instead.
Adding android project...
PlatformApi successfully found for platform android
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: io.cordova.hellocordova
        Name: HelloCordova
        Activity: MainActivity
        Android target: android-27
Copying android template project to platforms\android
Cannot find module 'cordova-common'
Error: Cannot find module 'cordova-common'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (C:\Projects\throwaway\mobilespecAndroid\platforms\android\cordova\lib\builders\builders.js:20:22)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

The same works from GitHub directly:

C:\Projects\throwaway\mobilespecAndroid  ([email protected])                                                                                                                                                     
λ cordova platform add https://github.com/apache/cordova-android --verbose                                                                                                                                      
Warning: using prerelease version 8.0.1-dev ([email protected])                                                                                                                                             
No scripts found for hook "before_platform_add".                                                                                                                                                                
Using cordova-fetch for https://github.com/apache/cordova-android                                                                                                                                               
fetch: Installing https://github.com/apache/cordova-android to C:\Projects\throwaway\mobilespecAndroid                                                                                                          
Running command: npm install https://github.com/apache/cordova-android --production --save                                                                                                                      
Command finished with error code 0: npm install,https://github.com/apache/cordova-android,--production,--save                                                                                                   
Removing "cordova-" prefix from cordova-android                                                                                                                                                                 
Warning: using prerelease platform [email protected].                                                                                                                                                           
Use 'cordova platform add android@latest' to add the latest published version instead.                                                                                                                          
Adding android project...                                                                                                                                                                                       
PlatformApi successfully found for platform android                                                                                                                                                             
Creating Cordova project for the Android platform:                                                                                                                                                              
        Path: platforms\android                                                                                                                                                                                 
        Package: io.cordova.hellocordova                                                                                                                                                                        
        Name: HelloCordova                                                                                                                                                                                      
        Activity: MainActivity                                                                                                                                                                                  
        Android target: android-27                                                                                                                                                                              
Copying android template project to platforms\android                                                                                                                                                           
Subproject Path: CordovaLib                                                                                                                                                                                     
Subproject Path: app                                                                                                                                                                                            
Android project created with [email protected]                                                                                                                                                          
Checking for any plugins added to the project that have not been installed in android platform                                                                                                                  
No differences found between plugins added to project and installed in android platform. Continuing...                                                                                                          
PlatformApi successfully found for platform android                                                                                                                                                             
Generating platform-specific config.xml from defaults for android at C:\Projects\throwaway\mobilespecAndroid\platforms\android\app\src\main\res\xml\config.xml                                                  
Merging project's config.xml into platform-specific android config.xml                                                                                                                                          
[Gradle Properties] Preparing Configuration                                                                                                                                                                     
[Gradle Properties] File missing, creating file with Cordova defaults.                                                                                                                                          
[Gradle Properties] Appended missing default: org.gradle.daemon=true                                                                                                                                            
[Gradle Properties] Appended missing default: org.gradle.jvmargs=-Xmx2048m                                                                                                                                      
[Gradle Properties] Appended missing default: android.useDeprecatedNdk=true                                                                                                                                     
[Gradle Properties] Updating and Saving File                                                                                                                                                                    
Merging and updating files from [www, platforms\android\platform_www] to platforms\android\app\src\main\assets\www                                                                                              
  mkdir platforms\android\app\src\main\assets\www\cordova-js-src                                                                                                                                                
  mkdir platforms\android\app\src\main\assets\www\cordova-js-src\android                                                                                                                                        
  copy  platforms\android\platform_www\cordova-js-src\android\nativeapiprovider.js platforms\android\app\src\main\assets\www\cordova-js-src\android\nativeapiprovider.js (new file)                             
  copy  platforms\android\platform_www\cordova-js-src\android\promptbasednativeapi.js platforms\android\app\src\main\assets\www\cordova-js-src\android\promptbasednativeapi.js (new file)                       
  copy  platforms\android\platform_www\cordova-js-src\exec.js platforms\android\app\src\main\assets\www\cordova-js-src\exec.js (new file)                                                                       
  copy  platforms\android\platform_www\cordova-js-src\platform.js platforms\android\app\src\main\assets\www\cordova-js-src\platform.js (new file)                                                               
  mkdir platforms\android\app\src\main\assets\www\cordova-js-src\plugin                                                                                                                                         
  mkdir platforms\android\app\src\main\assets\www\cordova-js-src\plugin\android                                                                                                                                 
  copy  platforms\android\platform_www\cordova-js-src\plugin\android\app.js platforms\android\app\src\main\assets\www\cordova-js-src\plugin\android\app.js (new file)                                           
  copy  platforms\android\platform_www\cordova.js platforms\android\app\src\main\assets\www\cordova.js (updated file)                                                                                           
  delete platforms\android\app\src\main\assets\www\img\cordova.png (no source)                                                                                                                                  
  copy  www\index.html platforms\android\app\src\main\assets\www\index.html (updated file)                                                                                                                      
  copy  www\js\index.js platforms\android\app\src\main\assets\www\js\index.js (updated file)                                                                                                                    
Wrote out android application name "HelloCordova" to C:\Projects\throwaway\mobilespecAndroid\platforms\android\app\src\main\res\values\strings.xml                                                              
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000                                                                                                    
Wrote out Android package name "io.cordova.hellocordova" to C:\Projects\throwaway\mobilespecAndroid\platforms\android\app\src\main\java\io\cordova\hellocordova\MainActivity.java                               
This app does not have launcher icons defined                                                                                                                                                                   
This app does not have splash screens defined                                                                                                                                                                   
This app does not have additional resource files defined                                                                                                                                                        
Prepared android project successfully                                                                                                                                                                           
No scripts found for hook "before_prepare".                                                                                                                                                                     
Checking config.xml and package.json for saved platforms that haven't been added to the project                                                                                                                 
Checking config.xml for saved plugins that haven't been added to the project                                                                                                                                    
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project                                                                                                                            
No scripts found for hook "before_plugin_add".                                                                                                                                                                  
Calling plugman.fetch on plugin "cordova-plugin-whitelist@1"                                                                                                                                                    
fetch: Installing cordova-plugin-whitelist@"1" to C:\Projects\throwaway\mobilespecAndroid                                                                                                                       
Running command: npm install cordova-plugin-whitelist@"1" --save                                                                                                                                                
Command finished with error code 1: npm install,cordova-plugin-whitelist@"1",--save                                                                                                                             
Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin cordova-plugin-whitelist@1 via registry.                              
Probably this is either a connection problem, or plugin spec is incorrect.                                                                                                                                      
Check your connection and plugin name/version/URL.                                                                                                                                                              
Error: npm: Command failed with exit code 1 Error output:                                                                                                                                                       
npm ERR! code EINVALIDTAGNAME                                                                                                                                                                                   
npm ERR! Invalid tag name ""1"": Tags may not have any characters that encodeURIComponent encodes.                                                                                                              
                                                                                                                                                                                                                
npm ERR! A complete log of this run can be found in:                                                                                                                                                            
npm ERR!     C:\Users\Jan\AppData\Roaming\npm-cache\_logs\2018-11-24T00_58_41_165Z-debug.log                                                                                                                    
Checking for any plugins added to the project that have not been installed in android platform                                                                                                                  
No differences found between plugins added to project and installed in android platform. Continuing...                                                                                                          
Generating platform-specific config.xml from defaults for android at C:\Projects\throwaway\mobilespecAndroid\platforms\android\app\src\main\res\xml\config.xml                                                  
Merging project's config.xml into platform-specific android config.xml                                                                                                                                          
[Gradle Properties] Preparing Configuration                                                                                                                                                                     
[Gradle Properties] Updating and Saving File                                                                                                                                                                    
Merging and updating files from [www, platforms\android\platform_www] to platforms\android\app\src\main\assets\www                                                                                              
  copy  platforms\android\platform_www\cordova-js-src\android\nativeapiprovider.js platforms\android\app\src\main\assets\www\cordova-js-src\android\nativeapiprovider.js (updated file)                         
  copy  platforms\android\platform_www\cordova-js-src\android\promptbasednativeapi.js platforms\android\app\src\main\assets\www\cordova-js-src\android\promptbasednativeapi.js (updated file)                   
  copy  platforms\android\platform_www\cordova-js-src\exec.js platforms\android\app\src\main\assets\www\cordova-js-src\exec.js (updated file)                                                                   
  copy  platforms\android\platform_www\cordova-js-src\platform.js platforms\android\app\src\main\assets\www\cordova-js-src\platform.js (updated file)                                                           
  copy  platforms\android\platform_www\cordova-js-src\plugin\android\app.js platforms\android\app\src\main\assets\www\cordova-js-src\plugin\android\app.js (updated file)                                       
  copy  platforms\android\platform_www\cordova.js platforms\android\app\src\main\assets\www\cordova.js (updated file)                                                                                           
  copy  www\index.html platforms\android\app\src\main\assets\www\index.html (updated file)                                                                                                                      
  copy  www\js\index.js platforms\android\app\src\main\assets\www\js\index.js (updated file)                                                                                                                    
Wrote out android application name "HelloCordova" to C:\Projects\throwaway\mobilespecAndroid\platforms\android\app\src\main\res\values\strings.xml                                                              
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000                                                                                                    
Wrote out Android package name "io.cordova.hellocordova" to C:\Projects\throwaway\mobilespecAndroid\platforms\android\app\src\main\java\io\cordova\hellocordova\MainActivity.java                               
This app does not have launcher icons defined                                                                                                                                                                   
This app does not have splash screens defined                                                                                                                                                                   
This app does not have additional resource files defined                                                                                                                                                        
Prepared android project successfully                                                                                                                                                                           
No scripts found for hook "after_prepare".                                                                                                                                                                      
Saving android@https://github.com/apache/cordova-android into platforms.json                                                                                                                                    
--save flag or autosave detected                                                                                                                                                                                
Saving android@https://github.com/apache/cordova-android into config.xml file ...                                                                                                                               
adding android to cordova.platforms array in package.json                                                                                                                                                       
No scripts found for hook "after_platform_add".                                                                                                                                                                                                                                                                                                                                                                              

So somehow installing from a local folder is broken.

My npm:

λ npm -v
6.4.1

Cordova cammands doesn't execute properly rather it hangs forever

I am trying to run cordova command on my command line, but any comand i execute, the cordova process hungs forever and does not execute successfully for example, i am trying to build my cordova app for android, when i i type
cordova run android --target=127.0.0.1:5000 --verbose
i get the following report

No scripts found for hook "before_run".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform android
Android Studio project detected
Checking config.xml for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing...
Generating platform-specific config.xml from defaults for android at C:\Users\HP-15\Campus-Enotice-Android\platforms\android\app\src\main\res\xml\config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [www, platforms\android\platform_www] to platforms\android\app\src\main\assets\www
Wrote out android application name "Campus E-Notice" to C:\Users\HP-15\Campus-Enotice-Android\platforms\android\app\src\main\res\values\strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000
Wrote out Android package name "co.bucktechnology.co" to C:\Users\HP-15\Campus-Enotice-Android\platforms\android\app\src\main\java\co\bucktechnology\co\MainActivity.java
This app does not have launcher icons defined
This app does not have splash screens defined
Updating resource files at platforms\android
Prepared android project successfully
No scripts found for hook "after_prepare".
ANDROID_HOME=D:\android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_111
studio
Subproject Path: CordovaLib
Subproject Path: app
Running command: cmd "/s /c "C:\Users\HP-15\Campus-Enotice-Android\platforms\android\gradlew.bat cdvBuildDebug -b C:\Users\HP-15\Campus-Enotice-Android\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m""
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Observed package id 'add-ons;addon-google_apis-google-24' in inconsistent location 'D:\android\sdk\add-ons\addon-google_apis-google-24-1' (Expected 'D:\android\sdk\add-ons\addon-google_apis-google-24')
Already observed package id 'add-ons;addon-google_apis-google-24' in 'D:\android\sdk\add-ons\addon-google_apis-google-24'. Skipping duplicate at 'D:\android\sdk\add-ons\addon-google_apis-google-24-1'
Observed package id 'add-ons;addon-google_apis-google-24' in inconsistent location 'D:\android\sdk\add-ons\addon-google_apis-google-24-1' (Expected 'D:\android\sdk\add-ons\addon-google_apis-google-24')
Already observed package id 'add-ons;addon-google_apis-google-24' in 'D:\android\sdk\add-ons\addon-google_apis-google-24'. Skipping duplicate at 'D:\android\sdk\add-ons\addon-google_apis-google-24-1'
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_9308avscpha59jkwt518ezcf1.run(C:\Users\HP-15\Campus-Enotice-Android\platforms\android\app\build.gradle:150)
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:processDebugJavaRes NO-SOURCE
:app:preBuild UP-TO-DATE
:app:preDebugBuild

And it stays like this for hours without executing further.
What is its that am doing wrong? Am using npm version 6.4.1 and cordova version 8.1.2

Can anyone help me with this ?

46507303_583499698777806_9203905406823301120_n

Before my error is the version of my gradlle zip version which is 4.1 then the CLI suggested to let me use gradlle.4.6-all.zip then when i ionic cordova build --prod the version is going back to 4.1 then i updated again to 4.10.2 and after i build it thats the error that CLI gave to me , Is there anyone can help me with this problem ?

Bump insight dependency

There is a vulnerability warning on lodash 3.10.1, which is being caused by an old version of insight. Needs bumping to eliminate that warning

[email protected] does not work on Node.js 4

C:\Users\brodybits
λ cordova --version
C:\Users\brodybits\AppData\Local\nvs\node\4.9.1\x64\node_modules\cordova\bin\cordova:24
const { events, CordovaError } = require('cordova-common');
      ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3

C:\Users\brodybits

While Node.js 4 support was dropped from Cordova 9, Node.js 4 should still be supported in patch and minor update of Cordova 8.

P.S. This issue was discovered while investigating issues reported in #337 and #338.

Edit-Config tag failing

It seems that the edit-config tag fails to find the plist property LSApplicationQueriesSchemes. It throws the error "Error: doc.find is not a function [ERROR] An error occurred while running cordova prepare ios (exit code 1)." when I run $cordova prepare ios. If manually edit my plist file and add the below code, my apps functions fine and I can launch the external apps.

Config.xml

<edit-config file="*-Info.plist" mode="merge" target="LSApplicationQueriesSchemes">

<string>fbapi</string>

<string>fbapi20130214</string>

<string>fbapi20130410</string>

<string>fbapi20130702</string>

<string>fbapi20131010</string>

<string>fbapi20131219</string>

<string>fbapi20140410</string>

<string>fbapi20140116</string>

<string>fbapi20150313</string>

<string>fbapi20150629</string>

<string>fbapi20160328</string>

<string>fbauth</string>

<string>fbauth2</string>

<string>fb-messenger-api20140430</string>

<string>fbapi</string>

<string>fb-messenger-share-api</string>

<string>fbauth2</string>

<string>fbshareextension</string>

<string>fb-messenger-platform-20150128</string>

<string>fb-messenger-platform-20150218</string>

<string>fb-messenger-platform-20150305</string>

<string>fb</string>

<string>twitter</string>

<string>linkedin</string>

</edit-config>

use global modules or how to minimize the git repo size?

Hello everybody!

Is it possible to link all used node_modules? Or what should a project ideally look like to reduce size? For example the .gitignore if we want to push the project into the git?

We have a project that thanks to the different platforms and duplicate node_modules with the same content, a size of over 1.5 GB. If I want to save this now, it's not exactly easy... because sooner or later I will reach my limits with my git server for 7 projects of the same size.

Unfortunately I don't know where to ask the best questions, so I created this question here.

Regards, Josef

[email protected] breaks when prompting for telemetry opt-in

Hi,

After installing npm install -g cordova no cordova commands work at all
Every command asks if you can track, answering yes or no make no difference
Ticks around a while then reports the following error
Tried reinstall, uninstall / reinstall
No luck

Cant check version because that too results in error - but I just ran normal install command

/Users/rgb/.nvm/versions/node/v8.9.4/lib/node_modules/cordova/node_modules/insight/lib/index.js:156
		prompt.close();
		       ^

TypeError: prompt.close is not a function
    at Insight.<anonymous> (/Users/rgb/.nvm/versions/node/v8.9.4/lib/node_modules/cordova/node_modules/insight/lib/index.js:156:10)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)

Also tried globally installing an npm module called prompt incase that was the issue - no luck

Emulate Broken Cordova 8

cordova emulate ios fails. This behavior started recently after iOS12

Error:
/platforms/ios/build/emulator/myapp.app/Info.plist file not found.

It looks like the build directory is never created

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.