Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cordova 9 q is not supported #85

Closed
phyr0s opened this issue Mar 25, 2019 · 7 comments
Closed

Cordova 9 q is not supported #85

phyr0s opened this issue Mar 25, 2019 · 7 comments

Comments

@phyr0s
Copy link

phyr0s commented Mar 25, 2019

With cordova 9 a lot of plugins are not working.

Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.

For example --> cordova plugin add cordova-plugin-opentok
or --> cordova plugin add cordova-android-support-gradle-release

@phyr0s phyr0s changed the title Cordova 9 Cordova 9 q is not supported Mar 25, 2019
@erisu
Copy link
Member

erisu commented Mar 25, 2019

@videmort this is an expected change.

Plugins should not be using modules that Cordova uses internally. We have also been removing Q from our libraries tools and platforms etc.

If a plugin relies on the Q npm package, that plugin should be updated to include this package as a dependency and use the native require call.

@erisu erisu closed this as completed Mar 25, 2019
@raphinesse
Copy link
Contributor

raphinesse commented Mar 25, 2019

Since we now require at least node 6 to run, plugin authors can also just use native promises instead of Q (if no extended functionality of Q is required).

As this error pops up a lot since the release of Cordova 9, we should maybe include more information in the error message. It probably would be very helpful to include the call site and maybe a link to a page that explains the error and necessary steps for end users and plugin authors.

@phyr0s
Copy link
Author

phyr0s commented Mar 25, 2019

@erisu thanks for quick response.

@Hubmeat
Copy link

Hubmeat commented Apr 23, 2019

@videmort this is an expected change.

Plugins should not be using modules that Cordova uses internally. We have also been removing Q from our libraries tools and platforms etc.

If a plugin relies on the Q npm package, that plugin should be updated to include this package as a dependency and use the native require call.

Hello, I also faced the same problem when I installed a plugin the cordova-plugin-crosswalk-webview-v2,
I'm just running ionic cordova plugin add cordova-plugin-crosswalk-webview-v2 and ionic cordova build android; Did is missing sth?

@tryhardest
Copy link

@Hubmeat crosswalk is a long since depreciated project. Move it Ionic webview.

@ilyass-ejjaouchi
Copy link

hi i've the same error did you find the solution
i removed the crosswalk dependency fom my package.json and it dosen't work yet

@breautek
Copy link
Contributor

breautek commented Jun 6, 2020

hi i've the same error did you find the solution
i removed the crosswalk dependency fom my package.json and it dosen't work yet

See

Plugins should not be using modules that Cordova uses internally. We have also been removing Q from our libraries tools and platforms etc.

If a plugin relies on the Q npm package, that plugin should be updated to include this package as a dependency and use the native require call.

You still have out-dated plugins. You'll have to determine which plugins is at fault (usually recognisable from the stacktrace), and either upgrade those plugins, or if they are already at latest, you should raise the issue with the plugin maintainers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants