0

我在尝试预览 mobilefirst 应用时遇到问题。我能够更早地运行和预览应用程序,但不确定发生了什么变化。

mfp start -dd
mobilefirst-cli verb cli process.argv=["/Applications/IBM/MobileFirst-CLI/IBMnode/bin/node","/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/bin/mobilefirst-cli.js","start","-dd"]
mobilefirst-cli verb cli opts={"ddebug":true,"argv":{"remain":["start"],"cooked":["start","--ddebug"],"original":["start","-dd"]}}
mobilefirst-cli verb cli mobilefirst@7.0.0.00.20150430-1604
mobilefirst-cli verb cli node@v0.10.30
Initializing MobileFirst Console.
mobilefirst-cli verb ant variables -Dbasedir=/Users/extremeblueaustin/Walmart/2015-walmart/mobile
mobilefirst-cli verb ant variables -Dworklight.jars.dir=/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib
mobilefirst-cli verb ant variables -Dworklight.ant.tools.dir=/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/ant-tools
mobilefirst-cli verb ant variables -Dworklight.hostname=9.41.78.128
mobilefirst-cli verb ant variables -file=/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml
mobilefirst-cli verb ant task build-WAR
Buildfile: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml

build-WAR:
     [echo] Building worklight WAR for project mobile
mobilefirst-cli verb cli finish with mobilefirst start
mobilefirst-cli verb code 1

当我去构建和预览时,它说运行'mobilefirst start'。

mfp preview -d
mobilefirst-cli verb cli process.argv=["/Applications/IBM/MobileFirst-CLI/IBMnode/bin/node","/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/bin/mobilefirst-cli.js","preview","-d"]
mobilefirst-cli verb cli opts={"debug":true,"argv":{"remain":["preview"],"cooked":["preview","--debug"],"original":["preview","-d"]}}
mobilefirst-cli verb cli mobilefirst@7.0.0.00.20150430-1604
mobilefirst-cli verb cli node@v0.10.30
mobilefirst-cli verb cli start with 
mobilefirst preview
Initializing MobileFirst Console.
mobilefirst-cli verb ant variables - Dbasedir=/Users/user/folder/folder/mobile ** redacted **
mobilefirst-cli verb ant variables -Dworklight.jars.dir=/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib
mobilefirst-cli verb ant variables -Dworklight.ant.tools.dir=/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/ant-tools
mobilefirst-cli verb ant variables -Dworklight.hostname=9.41.78.128
mobilefirst-cli verb ant variables -file=/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml
mobilefirst-cli verb ant task build-WAR
Buildfile: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml

build-WAR:
 [echo] Building worklight WAR for project mobile
Error: The MobileFirst server that you have configured does not appear to be running. Start the server with 'mobilefirst start'.
mobilefirst-cli verb cli finish with mobilefirst preview
mobilefirst-cli verb code 126

让我知道还需要什么,我将编辑问题。

4

2 回答 2

0

您可以检查您的JAVA_HOME环境变量是否设置为 jdk 目录。当我JAVA_HOME在我的环境中缺乏时,我也遇到了同样的问题。

于 2015-06-08T03:43:20.073 回答
0

我修复了安装 JDK 7 的问题。我使用了 JDK 8。

检查这个:mobile first cli project deploy failed

于 2015-07-27T00:15:33.100 回答