Adding android platform fails only first time for cordova-plugin-nativeaudio

时间:2019-04-08 14:02:03

标签: android cordova ionic-framework cordova-plugins

For some reason since adding cordova-plugin-nativeaudio@3.0.9 my jenkins build job fails on the step: ionic cordova platform add android

This is using android 7.1.4

It gives the following error:

Discovered plugin "cordova-plugin-nativeaudio" in config.xml. Adding it to the project
No scripts found for hook "before_plugin_add".
Calling plugman.fetch on plugin "cordova-plugin-nativeaudio@3.0.9"
saving
Running command: cmd "/s /c "C:\ims\build\node\npm.cmd install cordova-plugin-nativeaudio@3.0.9 --production --save""
Command finished with error code 0: cmd /s /c "C:\ims\build\node\npm.cmd install cordova-plugin-nativeaudio@3.0.9 --production --save"
Failed to restore plugin "cordova-plugin-nativeaudio" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin cordova-plugin-nativeaudio@3.0.9 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module

It fails the first time, but if I go onto the machine and run in cmd ionic cordova platform rm android, ionic cordova platform add android, then it works fine this second time. This is obviously not something that I should have to do.

We're using Nexus Repository manager for our NPM packages and this has been working fine for both our private npm repos and accessing public ones. We have a .npmrc file in our project. I'm not sure how cordova registries fit into this picture.

0 个答案:

没有答案