2

我之前写过关于运行Hyperloop项目的问题。如果运行一个新创建的项目,我从 Appcelerator Studio 添加了 Hyperloop,编译似乎被卡住了:

[INFO]  Starting Hyperloop assembly
[INFO]  Skipping Hyperloop compile, no usage found ...

所以我现在所做的是使用以下命令从命令行运行它:

HyperloopApp ophir$ appc run -p ios

Skipping Hyperloop compile, no usage found ...我收到以下错误消息之后:

/Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/hooks/ios/hyperloop.js:581
        return callback();
         ^
ReferenceError: callback is not defined
    at HyperloopiOSBuilder.copyHyperloopJSFiles (/Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/hooks/ios/hyperloop.js:581:10)
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/lib/async.js:64:45
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:689:13
    at iterate (/Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:265:13)
    at nextTickCallbackWith0Args (node.js:433:9)
    at process._tickCallback (node.js:362:13)
---------------------------------------------
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:275:35
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:44:16
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:694:17
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:173:37
    at HyperloopiOSBuilder.generateStubs (/Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/hooks/ios/hyperloop.js:556:10)
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:689:13
    at iterate (/Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:265:13)
    at nextTickCallbackWith0Args (node.js:433:9)
---------------------------------------------
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:275:35
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:44:16
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:694:17
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:173:37
    at /Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/async/lib/async.js:52:16
    at Object.async.forEachOf.async.eachOf (/Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/async/lib/async.js:236:30)
    at Object.async.forEach.async.each (/Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/async/lib/async.js:209:22)
    at Object.compileResources (/Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/node_modules/hyperloop-metabase/lib/metabase.js:440:8)
    at HyperloopiOSBuilder.compileResources (/Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/hooks/ios/hyperloop.js:547:14)
---------------------------------------------
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:275:35
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:44:16
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:694:17
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:173:37
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/lib/async.js:64:51
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:689:13
    at iterate (/Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:265:13)
    at nextTickCallbackWith0Args (node.js:433:9)
---------------------------------------------
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:275:35
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:44:16
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:694:17
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:173:37
    at HyperloopiOSBuilder.generateSourceFiles (/Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/hooks/ios/hyperloop.js:467:10)
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:689:13
    at iterate (/Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:265:13)
    at nextTickCallbackWith0Args (node.js:433:9)
---------------------------------------------
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:275:35
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:44:16
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:694:17
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:173:37
    at HyperloopiOSBuilder.<anonymous> (/Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/hooks/ios/hyperloop.js:454:4)
    at /Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/async/lib/async.js:52:16
    at replenish (/Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/async/lib/async.js:314:29)
    at /Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/async/lib/async.js:326:29
    at /Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/async/lib/async.js:44:16
---------------------------------------------
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:275:35
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:44:16
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:694:17
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:173:37
    at HyperloopiOSBuilder.processThirdPartyFrameworks (/Users/ophir/Documents/Appcelerator_Studio_Workspace/HyperloopApp/plugins/hyperloop/hooks/ios/hyperloop.js:236:10)
    at /Users/ophir/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:689:13
    at iterate (/Users/ophir/.appcelerator/install/5.1.0/pa2016-01-25T18:27:44.759Z | ERROR  | ti run exited with error code 1

如何让 Hyperloop 运行?

4

1 回答 1

3

我找到了解决方案。显然,这似乎是一个权限问题——即使消息不是这样。因为我有以下行:

[INFO]  Skipping Hyperloop compile, no usage found ...

我决定在项目中添加一个最小的 Hyperloop 代码:

var UIView = require('UIKit/UIView');

然后,当我再次运行时,我收到一条不同的错误消息,开头为:

Error: spawn EACCES

这是我已经知道是权限问题的问题 - 因为 Hyperloop 模块是从 Internet 下载的,所以这是有道理的。

修复很容易,只需运行

sudo chmod -R a+rwx /appfolder

一切都编译。

于 2016-01-25T19:59:50.980 回答