Comments (8)
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.
@breautek I check this in next days...
from cordova-lib.
and I can't understand why some plugins will be stored in dependency block, and other not...
from cordova-lib.
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.
Shouldn't "requireCordovaModule" be replaced since cordova 9 doesn't support it anymore ?!
from cordova-lib.
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.
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. UsingrequireCordovaModule
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.
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)
- Cordova does not support subfolders, when using semver
- Cordova platform add android, removes node modules with semver HOT 3
- Improve how Cordova checks for required project information HOT 1
- plugin.xml <dependency> tag commit attribute doesn't work as documented for branches HOT 1
- cordova prepare not resolving platform specification correctly for devDependency HOT 1
- NodeJS14: Warning: Accessing non-existent property 'android' HOT 3
- Unable to remove a plugin using a not officially supported platform HOT 1
- Process.env variables are not present in hooks HOT 1
- Cordova doesn't work with NPM 7 HOT 15
- Failure to install plugin with url#git_ref:subdir spec HOT 1
- One test fails on CI HOT 1
- Wrong platform version is detected when dependencies and devDependencies are both present HOT 1
- Fail to add plugin with prerelease version because of "Invalid Version" HOT 1
- Dependencies are wiped on each step of project creation with cordova-lib and NPM 7 HOT 2
- Question About API 24 And API 30 And Question About How Make Jar Using Cordova 9.1.0 And Cordova 10.0.0 (Solution for jcenter() deprecated) HOT 1
- restore-util doesn't properly find platform spec info
- Adding plugins for only specific platforms HOT 10
- Cordova uses the wrong working directory and loads top-level config.xml HOT 1
- Bug(tests): Test#012 failure HOT 5
- Why cordova-android 12.0.0 is not used ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-lib.