我正在使用Ionic4,由于cors问题,我想使用原生的Ionic HTTP包。为此,我必须安装cordova插件:
ionic cordova plugin add cordova-plugin-advanced-http它要求启动并运行Cordova,所以我:
npm install -g cordova然后我再次尝试安装该插件,然后出现下一个错误
无法启动该服务,原因可能是该服务已禁用,也可能是因为它没有与其关联的已启用设备。
我也尝试在我的windows服务列表中查找该服务,但无法找到它,我如何手动启动它?
请注意,我已经尝试了npm卸载-g cordova。
完全错误:
cordova plugin add cordova-plugin-advanced-http --save
\Users\Ezequiel\Desktop\galum\front\testFirebase\node_modules\windows-release\
de_modules\execa\index.js:347
throw err;
^
ror: Command failed: wmic os get Caption
scription = The service cannot be started, either because it is disabled or be
use it has no enabled devices associated with it.
at makeError (c:\Users\Ezequiel\Desktop\galum\front\testFirebase\node_module
windows-release\node_modules\execa\index.js:174:9)
at Function.module.exports.sync (c:\Users\Ezequiel\Desktop\galum\front\testF
ebase\node_modules\windows-release\node_modules\execa\index.js:338:15)
at windowsRelease (c:\Users\Ezequiel\Desktop\galum\front\testFirebase\node_m
ules\windows-release\index.js:34:24)
at osName (c:\Users\Ezequiel\Desktop\galum\front\testFirebase\node_modules\o
name\index.js:39:18)
at new Insight (c:\Users\Ezequiel\Desktop\galum\front\testFirebase\node_modu
s\insight\lib\index.js:37:13)
at Object.<anonymous> (c:\Users\Ezequiel\Desktop\galum\front\testFirebase\no
_modules\cordova\src\telemetry.js:26:15)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
RROR] An error occurred while running subprocess cordova.
cordova plugin add cordova-plugin-advanced-http --save exited with exit
code 1.
Re-running this command with the --verbose flag may provide more
information.发布于 2019-06-20 21:07:20
您应该指定要安装的Cordova的版本:
npm install -g cordova@8.0.0https://stackoverflow.com/questions/56094204
复制相似问题