Closed AndreaVitale closed 9 years ago
You can actually work around this issue by saying that it’s a member of nativeDependencies
in the package.json. It should let you require files not in scope.
The build process now complete successfully with this directive in package.json
"nativeDependencies": {
"alloy/animation": "*"
}
but.. when I try to use this module inside a test application, this one crash with this error:
[ERROR] : Script Error Couldn't find module: alloy/animation for architecture: x86_64
Super strange. That's not a titaniumifier issue anymore. What's that module? Are you sure it's there?
I've to package a module that use Builtin Titanium Animation and I require it as per the docs! How can I solve? Thank you!
Looks like it's one of those pieces of the std alloy library that gets loaded only if it is found to be required, and looks like alloy doesn't check modules for such require
calls.
Could you try to add require('alloy/animation')
somewhere in the app and see if it works?
In index.js (where I'm trying my titaniumified-module) I tryied:
var animator = require("alloy/animation");
Ti.API.info(animator.HORIZONTAL);
and into console i see "horizontal" as expected.
And does loading the module works now?
No, I'll explain in details what I have. Into index.js of the module that I have to tianiumify there is:
module.exports.Animation = require("alloy/animation");
When I titaniumify it and load into the test application the error
[ERROR] : Script Error Couldn't find module: alloy/animation for architecture: x86_64
occurs.
If I try to normally require the alloy/animation
into index.js of application there's no problem.
Are both a normal, working require and the module on the same app?
What I'm guessing is that if you don't require it in the app (outside modules) the module is not injected in the 'compiled' Resources dir.
Exactly now it works! Thank you!
There's no way to require, inside my module, "alloy/animation"? If I try to build my custom module and, obviously, the build process failed with this message