MobileFirst 8.0 Cordova CLI Interface not found in

2019-07-08 10:16发布

I have successfully started the server, registered the app and deployed all adapters. However, whenever I call the command:

mfpdev app preview

The CLI is responding with the following message:

[BS] Serving files from: ./platforms Error: The Cordova command-line interface is not installed on your system path.

Of course I have previously checked that Cordova is available, by using cordova -v (I am gettint '6.1')

What could be the problem?

I'm using OSX El Capitan 10.11.3

Update:

mfpdev info command shows the following information:

Cordova information: Version: 6.3.1 Installed plug-ins: cordova-plugin-console 1.0.3 "Console" cordova-plugin-device 1.1.2 "Device" cordova-plugin-dialogs 1.2.1 "Notification" cordova-plugin-globalization 1.0.3 "Globalization" cordova-plugin-mfp 8.0.2016080320 "IBM MobileFirst Platform Foundation" cordova-plugin-okhttp 2.0.0 "OkHttp" cordova-plugin-splashscreen 3.2.2 "Splashscreen" cordova-plugin-statusbar 2.1.3 "StatusBar" cordova-plugin-whitelist 1.2.2 "Whitelist" ionic-plugin-keyboard 2.2.1 "Keyboard" Installed platforms: android 5.2.2 ios 4.2.1

Cordova app configuration: MobileFirst Platform Foundation namespace: http://www.ibm.com/mobilefirst/cordova-plugin-mfp Widget ID: com.ionicframework.todo107397 Widget version: 0.0.1 Widget name: todo Main file: index.html MobileFirst SDK checksum for Android: 1638037605 MobileFirst SDK checksum for iOS: 2417110129 MobileFirst SDK checksum for Windows 10 UWP: 0 MobileFirst SDK checksum for Windows 8 desktop: 0 MobileFirst SDK checksum for Windows Phone 8: 0 MobileFirst Platform Foundation platform version: 8.0.0.00-20160803-1114 MobileFirst Platform Foundation client custom init: false MobileFirst Platform Foundation server URL: http://10.125.66.44:9080 MobileFirst Server runtime: mfp MobileFirst Platform Foundation Direct Update authorization key: MobileFirst Platform Foundation test web resources for Android: false MobileFirst Platform Foundation test web resources for iOS: false MobileFirst Platform Foundation test web resources for Windows 10 UWP: false MobileFirst Platform Foundation test web resources for Windows 8 desktop: false MobileFirst Platform Foundation test web resources for Windows Phone 8: false MobileFirst Platform Foundation ignore file extensions for Android: png, jpg, jpeg, gif, mp4, mp3 MobileFirst Platform Foundation ignore file extensions for iOS: png, jpg, jpeg, gif, mp4, mp3 MobileFirst Platform Foundation ignore file extensions for Windows 10 UWP: png, jpg, jpeg, gif, mp4, mp3 MobileFirst Platform Foundation ignore file extensions for Windows 8 desktop: png, jpg, jpeg, gif, mp4, mp3 MobileFirst Platform Foundation ignore file extensions for Windows Phone 8: png, jpg, jpeg, gif, mp4, mp3 MobileFirst Platform Foundation language preferences: en

Cordova is clearly accessible from mfpdev, however the error message persists

3条回答
在下西门庆
2楼-- · 2019-07-08 10:47

Try

ionic cordova build --prod

You will show you actual error, for which error msg is appearing.

Same problem I was facing, found, some missing resource in config.xml is making whole noise, by above method. Resolved that and done.

查看更多
够拽才男人
3楼-- · 2019-07-08 10:50

In MobileFirst 8.0 you need to install Cordova in the CLI apart from the MobileFirst CLI

Instructions in our getting started tutorials. Please see the link for more information.

Download and install NodeJS.
From a Command-line window, run the command: npm install -g cordova.

https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/setting-up-your-development-environment/cordova-development-environment/

查看更多
Fickle 薄情
4楼-- · 2019-07-08 11:03

I faced the same issue while walking through the tutorial 'Getting started with Ionic and MobileFirst Platform Foundation 8.0 Beta' found on youtube. I resolved the issue the with command on the shell

$> npm install -g cordova ionic

After that command

$> mfpdev app preview

started to server the app in the browser as expected. I already had the cordova installed.

查看更多
登录 后发表回答