[TIMOB-12792] Code Processor marks require of module by id as problem
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-03-29T00:05:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Code Processor |
Labels | n/a |
Reporter | Christopher Williams |
Assignee | Bryan Hughes |
Created | 2013-02-20T16:27:06.000+0000 |
Updated | 2013-08-14T20:48:26.000+0000 |
Description
I tried running the code processor against a Titanium Mobile project on latest master build (3.1.0.v20130215185802). The project includes a require of the "com.soasta.touchtest" module. The line is returned as an error by the code processor:
The require path "/Users/cwilliams/workspaces/runtime-Titanium-360/sadfasdf/Resources/com.soasta.touchtest.js" could not be found
The module is inside the project at modules/iphone/com.soasta.touchtest
Did you run the code processor with "-o iphone"? Also can you check which version of the code processor you are running by opening the package.json file and looking at the version entry? The code processor is typically installed in /usr/local/lib/node_modules/titanium-code-processor on OS X and Linux.
I'm running 0.3.1 with a couple hacks (two overwritten files) pinnamuri gave me to get it working when integrated with Studio. I ran it specifying "iphone" as the platform.
Just to verify: the require looks like:
and the module file is at 'Resources/iphone/com.soasta.tocuhtest.js' correct?
I had a type in my description, just fixed it. The line of code is:
var touchTestModule = require("com.soasta.touchtest");
The module is installed in the project atmodules/iphone/com.soasta.touchtest
I believe it is a native module. There is noResources/iphone/com.soasta.touchtest.js
file.Can you check if it's native and, if so, that it's listed in the tiapp.xml? Native modules *must* be listed in the tiapp.xml file according to the docs and some of the people I talked to.
Here's the relevant portion fo the tiapp.xml file. It's in there, and it's a native iphone module.
That's strange, that should work. Would you mind attaching your complete project (or a minimum working sample w/ tiapp.xml) so I can investigate further?
I ran the code processor on your project and it worked just fine for me. I used the command: titanium-code-processor analyze -o iphone --all-plugins -l debug What is the exact command that you ran? Also, those hacked files are out of date. You should go into the code processor and run "npm update" (with sudo if necessary) to pull the latest node-appc from NPM, which should work just fine without modification.