Code Monkey home page Code Monkey logo

Comments (8)

breautek avatar breautek commented on May 30, 2024 2

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.

from cordova-lib.

WuglyakBolgoink avatar WuglyakBolgoink commented on May 30, 2024 1

@breautek I check this in next days...

from cordova-lib.

WuglyakBolgoink avatar WuglyakBolgoink commented on May 30, 2024

and I can't understand why some plugins will be stored in dependency block, and other not...

from cordova-lib.

breautek avatar breautek commented on May 30, 2024

Is this still an issue?

This appears to work for me:

cordova create test test.cordova.app
cd test
cordova plugins add cordova-plugin-device
vim package.json

I see in my package.json file:

"dependencies": {
        "cordova-plugin-device": "^2.0.3"
},

My cordova version:
9.0.0 ([email protected])

from cordova-lib.

gNazi avatar gNazi commented on May 30, 2024

Shouldn't "requireCordovaModule" be replaced since cordova 9 doesn't support it anymore ?!

from cordova-lib.

gNazi avatar gNazi commented on May 30, 2024

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.

True, as im getting this error when trying to build:
Using "requireCordovaModule" to load non-cordova module "fs" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.

Only problem is I can't find the code at fault, i've searched my entire project and the plugins i've used for it !

from cordova-lib.

breautek avatar breautek commented on May 30, 2024

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.

True, as im getting this error when trying to build:
Using "requireCordovaModule" to load non-cordova module "fs" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.

Only problem is I can't find the code at fault, i've searched my entire project and the plugins i've used for it !

This issue is not related to the issue you're commenting on. I'll provide some guidance, but if you have anymore questions, please open a new support ticket.

Likely a plugin you're using. Perhaps using it in an obscure way like requireCordovaModule(someVariable). I'd recommend loosening you're search keywords. Can even modify requireCordovaModule to print out a stacktrace to help pinpoint to the source. (It might already do this if you use the --verbose flag).

from cordova-lib.

raphinesse avatar raphinesse commented on May 30, 2024

Closing this as we could not reproduce the issue and haven't heard back from @WuglyakBolgoink. If you could reproduce the issue, please let us know how.

from cordova-lib.

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.