Giter Club home page Giter Club logo

Comments (10)

yuchi avatar yuchi commented on June 9, 2024

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.

from titaniumifier.

AndreaVitale avatar AndreaVitale commented on June 9, 2024

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

from titaniumifier.

yuchi avatar yuchi commented on June 9, 2024

Super strange. That's not a titaniumifier issue anymore. What's that module? Are you sure it's there?

from titaniumifier.

AndreaVitale avatar AndreaVitale commented on June 9, 2024

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!

from titaniumifier.

yuchi avatar yuchi commented on June 9, 2024

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?

from titaniumifier.

AndreaVitale avatar AndreaVitale commented on June 9, 2024

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.

from titaniumifier.

yuchi avatar yuchi commented on June 9, 2024

And does loading the module works now?

from titaniumifier.

AndreaVitale avatar AndreaVitale commented on June 9, 2024

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.

from titaniumifier.

yuchi avatar yuchi commented on June 9, 2024

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.

from titaniumifier.

AndreaVitale avatar AndreaVitale commented on June 9, 2024

Exactly now it works! Thank you!

from titaniumifier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.