cordova-失败:不支持q [英] cordova - Failed: q is not supported

查看:422
本文介绍了cordova-失败:不支持q的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我构建cordova时,此消息视图:

When I build cordova this message view:

不支持使用"requireCordovaModule"加载非科尔多瓦模块"q".取而代之的是,将此模块添加到您的依赖项中,并使用常规的"require"进行加载.

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.

如何解决此问题?

PS.我在此构建问题之前更新了npm.因此,更新之前的建筑物并不是问题.对不起,我的英语))

PS. I updated npm before this build problem. So it was not problem buildings before update. Sorry my English))

推荐答案

通过安装较低版本的cordova解决了此问题.似乎所有版本高于8.1.1的cordova都会破坏许多插件.

Solved this problem by installing a lower version of cordova. Seems like every version of cordova that is > 8.1.1 breaks a number of plugins.

例如,插件cordova-sqlite-storage未能安装,并显示以下错误消息:

For instance, the plugin cordova-sqlite-storage failed to install with the following error message:

无法安装"cordova-sqlite-storage":CordovaError:使用 "requireCordovaModule"加载非科尔多瓦模块"q"不是 支持的.相反,将此模块添加到您的依赖项中并使用 定期需要"来加载它.

Failed to install 'cordova-sqlite-storage': CordovaError: 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.

要解决该问题,我只是通过调用npm uninstall cordova -g删除了cordova,然后再次使用npm install -g cordova@8.1.1

To solve that issue, I simply removed cordova by calling npm uninstall cordova -g and then installed it globally again with npm install -g cordova@8.1.1

修复后,不再显示任何错误,并且cordova-sqlite-storage顺利安装!!

After that fix, no more errors are getting displayed and cordova-sqlite-storage gets installed smoothly!!

为Android安装"cordova-sqlite-storage"

Installing "cordova-sqlite-storage" for android

这篇关于cordova-失败:不支持q的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆