You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/04/01 12:02:25 UTC

[GitHub] [cordova] asgoth opened a new issue #91: --nosave flag causes errors when adding platforms/plugins

asgoth opened a new issue #91: --nosave flag causes errors when adding platforms/plugins
URL: https://github.com/apache/cordova/issues/91
 
 
   # Bug Report
   
   ## Problem
   
   On several `cordova` commands, the `nosave` flag causes issues.
   
   ------------------------------------------------------------
   
   ### What is expected to happen?
   
   Platform/plugin correctly installed. Installation succeeds without the `nosave` flag.
   
   ### What does actually happen?
   
   On `cordova platform add ios --nosave`:
   
   ```
   ~/Development/git/test-cordova/test » cordova platform add ios --nosave
   Using cordova-fetch for cordova-ios@^5.0.0
   Adding ios project...
   Creating Cordova project for the iOS platform:
   	Path: platforms/ios
   	Package: io.cordova.hellocordova
   	Name: HelloCordova
   iOS project created with cordova-ios@5.0.0
   Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
   Installing "cordova-plugin-whitelist" for ios
   Failed to install 'cordova-plugin-whitelist': Error: Cannot find module './src/superspawn'
       at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
       at Function.Module._load (internal/modules/cjs/loader.js:508:25)
       at Module.require (internal/modules/cjs/loader.js:637:17)
       at Object.get (/Users/xxx/Development/git/test-cordova/test/node_modules/cordova-common/src/util/addProperty.js:27:44)
       at Object.<anonymous> (/Users/xxx/Development/git/test-cordova/test/platforms/ios/cordova/lib/Podfile.js:26:43)
       at Module._compile (internal/modules/cjs/loader.js:701:30)
       at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
       at Module.load (internal/modules/cjs/loader.js:600:32)
       at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
       at Function.Module._load (internal/modules/cjs/loader.js:531:3)
   Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try adding it again. Error: Error: Cannot find module './src/superspawn'
   ```
   
   On `cordova plugin add xxx --nosave` (doesn't matter which plugin):
   
   ```
   ~/Development/git/test-cordova/test » cordova plugin add cordova-plugin-camera --nosave
   Installing "cordova-plugin-camera" for android
   cordova-android version check failed ("/Users/xxx/Development/git/test-cordova/test/platforms/android/cordova/version"), continuing anyways.
   Unable to load PlatformApi from platform. Error: Cannot find module 'properties-parser'
   Failed to install 'cordova-plugin-camera': Error [ERR_UNHANDLED_ERROR]: Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
       at CordovaEventEmitter.emit (events.js:178:17)
       at CordovaEventEmitter.emit (/Users/xxx/.nvm/versions/node/v10.15.3/lib/node_modules/cordova/node_modules/cordova-common/src/events.js:69:22)
       at Object.getPlatformApiFunction (/Users/xxx/.nvm/versions/node/v10.15.3/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/util.js:371:20)
       at Object.getPlatformApi (/Users/xxx/.nvm/versions/node/v10.15.3/lib/node_modules/cordova/node_modules/cordova-lib/src/platforms/platforms.js:55:32)
       at handleInstall (/Users/xxx/.nvm/versions/node/v10.15.3/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:580:29)
       at /Users/xxx/.nvm/versions/node/v10.15.3/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:349:28
       at process._tickCallback (internal/process/next_tick.js:68:7)
   Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
   ```
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
       cordova platform add ios android --nosave
       cordova plugin add cordova-plugin-camera --nosave
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   Some commands fail for ios, other for android
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   - osx 10.14.4
   - npm 6.4.1
   - node 10.15.3
   - cordova (cli) 9.0.0
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [X ] I searched for existing GitHub issues
   - [ X] I updated all Cordova tooling to most recent version
   - [ X] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org