question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cordova 9.0.0 plugin add not saving plugin in dependency list

See original GitHub issue

Bug Report

Problem

What is expected to happen?

{
  "devDependencies": {
    "cordova-plugin-whitelist": "1.3.4"
  },
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {}
    },
    "platforms": [
      "ios",
      "android"
    ]
  },
  "dependencies": {
    "cordova-android": "8.0.0",
    "cordova-ios": "5.0.1",
    "cordova-plugin-device": "a.b.c" <<<<<<<<<<<<<<< I need this line
  }
}

What does actually happen?

  • add plugin

cordova plugins add cordova-plugin-device --save
  • open package.json
{
  "devDependencies": {
    "cordova-plugin-whitelist": "1.3.4"
  },
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {}
    },
    "platforms": [
      "ios",
      "android"
    ]
  },
  "dependencies": {
    "cordova-android": "8.0.0",
    "cordova-ios": "5.0.1"  <<<<<<<<< missed  "cordova-plugin-device": "a.b.c"
  }
}

Information

cordova-lib@9.0.1 with:
  cordova-common@3.2.0
  cordova-create@2.0.0
  cordova-fetch@2.0.1
  cordova-serve@3.0.0

Environment: 
  OS: darwin
  Node: v10.16.0
  npm: 6.9.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
breautekcommented, Oct 10, 2019

Shouldn’t “requireCordovaModule” be replaced since cordova 9 doesn’t support it anymore ?!

requireCordovaModule is still used.

But there are many plugins that used it wrong. It should only be used to import cordova modules. Using requireCordovaModule to require non-cordova modules such as the (q package) is no longer supported as of cordova 9.

1reaction
WuglyakBolgoinkcommented, Oct 5, 2019

@breautek I check this in next days…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cordova Lib 9.0.0 Released!
After the update, I receive the following message: using "requirecordovamodule" to load the non-Cordova "q" module is not supported. Instead, ...
Read more >
The latest version of the plugin is not installed - Stack Overflow
I'm trying to download the latest version of cordova-plugin-crypto-file plugin. But for some reason the installed version 1.2.1. What could be ...
Read more >
cordova-plugin-firebase-lib - npm
Cordova Firebase Plugin2. npm version. This plugin brings push notifications, analytics, event tracking, crash reporting and more from ...
Read more >
BlackBerry Dynamics SDK for Cordova version 8.1
The following plugins have been removed from the SDK package and made ... and one of the SDK plugins from BlackBerry GitHub (see...
Read more >
Cannot build Hybrid Remote release APK with Mobile SDK 8.0
Added my existing bootconfig.xml and updated config.xml with settings from my existing project. Added cordova plugins. I went through the list ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found