【问题标题】:Appcelerator Studio undefined1 SyntaxError: Unexpected end of inputAppcelerator Studio undefined1 SyntaxError: Unexpected end of input
【发布时间】:2017-02-28 05:28:08
【问题描述】:

我的 Appcelerator Studio 突然崩溃,无法再打开或使用它。我尝试卸载并重新安装它,但没有运气。

对此有什么想法吗?请查看Crash error report here

系统信息

操作系统:MAC(OS X El Capitan v10.11.3) 内存:4GB RAM

崩溃报告

undefined:1

SyntaxError: Unexpected end of input
at Object.parse (native)
at Object.readConfig (/usr/local/lib/node_modules/appcelerator/lib/util.js:720:30)
at Object.<anonymous> (/usr/local/lib/node_modules/appcelerator/bin/appc:96:23)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3

【问题讨论】:

  • 您能否添加ti info 输出。看起来更像是一个节点问题(例如错误的版本)
  • @miga,我不能在此使用 CLI,它总是给我上面的错误。正确答案已由 Kondal 发布。

标签: ide appcelerator crash-reports appcelerator-studio


【解决方案1】:

您的 CLI 版本和 Node 版本之间似乎不兼容。

您现在运行的节点和 CLI 版本是什么?

运行最新的 Studio 4.8.0/CLI 6.0/SDK 6.0 需要节点 4.2 及更高版本。理想情况下,Studio Mac 安装程序会解决这个问题,但在您的情况下并没有发生。

要使其适用于您的情况,请按照此处的说明进行 Node 和 CLI 的全新安装,然后运行工作室。

https://medium.com/all-titanium/reinstalling-appcelerator-titanium-on-mac-from-scratch-9a2bb6b9b629#.d0k1wzt3z

【讨论】:

  • 谢谢!!!我已经根据您提供的链接解决了这个问题。基本上,罪魁祸首是“~/.android”目录。它似乎在 IDE 的自动更新等过程中损坏了。但是为了更安全和直接,最好是重新安装干净。
【解决方案2】:

我在使用 Appc 7.1.2 时遇到了类似的错误——这就是我学到的。

具体错误发生在/usr/local/lib/node_modules/appcelerator/lib/util.js:720

对于其他 Appcelerator 版本,util.js 中的行号可能不同。

我在编辑器中打开了util.js 并添加了一行来弄清楚发生了什么:

console.log(cf);

现在我可以看到它尝试读取的配置文件,在我的例子中结果是:

~/.appcelerator/appc-cli.json

这个 .json 文件是空的。删除此文件后,错误消失了。

现在运行 appc setup 并输入您的凭据并回答其他提示,这将重新创建和重写 appc-cli.json。

【讨论】:

    猜你喜欢
    • 2017-06-24
    • 2018-02-19
    • 2021-09-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-28
    • 2021-11-06
    • 1970-01-01
    相关资源
    最近更新 更多