node.js配置文件语法错误

时间:2014-12-30 17:59:53

标签: android json node.js cordova

我安装了node.js和cordova e.t.c.开发Android应用程序但是当在CMD中执行node create_app.js命令时,它会给出错误消息

  No config file specified.
  Searching for config.json in the current directory.
  Load Config file SyntaxError: C:\SAP\SHAT-1.0.1\WebIdeCompanion\companionapp\config.json:    
  Unexpected token S

即使此目录中有config.json个文件,其内容也是

{
    "appName": "Testingapp",
    "packageName": "com.sap.ide.companion",
    "targetFolder": "CompanionApp",
    "platforms": ["android"],
    "pluginDir": "C:\SAP\MobileSDK3\KapselSDK\plugins"
}

1 个答案:

答案 0 :(得分:1)

您是否尝试转义pluginDir内的斜杠?

{
    "appName": "Testingapp",
    "packageName": "com.sap.ide.companion",
    "targetFolder": "CompanionApp",
    "platforms": ["android"],
    "pluginDir": "C:\\SAP\\MobileSDK3\\KapselSDK\\plugins"
}