Coder Social home page Coder Social logo

Comments (5)

becvert avatar becvert commented on June 19, 2024 1

npm might not be running the post_install script if the dependency target is local.

OK that was it.
I use a cordova base project just to fetch plugins I need. I then copy those to another destination. What I need to do is to add the modules preference in this base project too
Sorry for the inconvenience.
Thank you very much

from cordova-diagnostic-plugin.

becvert avatar becvert commented on June 19, 2024

I read this note

It's vital that the preference be added to your config.xml before you install the plugin, otherwise the preference will not be applied and all modules will be added

I always rebuild my app from scratch:
1- platforms & plugins folders are removed from my cordova project directory
2- npm i --package-lock-only
3- cordova platform add
4- cordova prepare

from cordova-diagnostic-plugin.

becvert avatar becvert commented on June 19, 2024

It looks like the postinstall script is not called

from cordova-diagnostic-plugin.

becvert avatar becvert commented on June 19, 2024

Could it be because I use a local copy of this plugin. In my package.json:

"dependencies": {
        "cordova.plugins.diagnostic": "../cordova/cordova.plugins.diagnostic"
}

from cordova-diagnostic-plugin.

dpa99c avatar dpa99c commented on June 19, 2024

Could it be because I use a local copy of this plugin. In my package.json:

"dependencies": {
        "cordova.plugins.diagnostic": "../cordova/cordova.plugins.diagnostic"
}

npm might not be running the post_install script if the dependency target is local.

If the local version is a fork, presumably you have it backed up remotely such as in a github/bitbucket repo, in which case you should update the target to the remote repo URL:

"dependencies": {
        "cordova.plugins.diagnostic": "github:username/cordova.plugins.diagnostic"
}

if the local version is not forked, just change it the npm release version:

"dependencies": {
        "cordova.plugins.diagnostic": "cordova.plugins.diagnostic^x.y.z"
}

after this running, npm install should run the post_install script and apply the module selection mechanism

from cordova-diagnostic-plugin.

Related Issues (20)

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.