Hyperloop compilation error

耗尽温柔 提交于 2020-01-04 05:42:05

问题


I've written before about a problem running Hyperloop project. If run a newly created project to witch I added Hyperloop from Appcelerator Studio it seems like compilation is stuck on:

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

So what I did now is to run it from command line using:

HyperloopApp ophir$ appc run -p ios

And right after Skipping Hyperloop compile, no usage found ... I get the following error messages:

/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

How can I make Hyperloop run?


回答1:


I found the solution. apparently it seems to be a permission problem - even if the message isn't so. since I had the following line:

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

I decided to add a minimal Hyperloop code inside the project:

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

Then when I ran again I got a different error message starting with:

Error: spawn EACCES

This is something I already know to be permission issues - and it makes sense since the Hyperloop module was downloaded from the internet.

fixup was easy, just run

sudo chmod -R a+rwx /appfolder

everything compiles.



来源:https://stackoverflow.com/questions/34999704/hyperloop-compilation-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!