Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16786] iOS: Module relative path resolution does not work anymore

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2018-11-16T15:43:23.000+0000
Affected Version/sRelease 3.2.2
Fix Version/sn/a
ComponentsiOS
LabelscommonJS, path, relative, require
Reportercarlo
AssigneeUnknown
Created2014-03-21T15:22:30.000+0000
Updated2018-11-16T15:43:23.000+0000

Description

Can't run the example from docs: https://wiki.appcelerator.org/display/guides/CommonJS+Modules+in+Titanium#CommonJSModulesinTitanium-JavaScriptModulePathResolution "./" seems point to alway point to "Resources" "../" give substringToIndex error Android works as expected. var myModule = require("../lib/myModule")(); //[ERROR] : Script Error * -[__NSCFConstantString substringToIndex:]: Index 1 out of bounds; string length 0 var SomeOtherCustomView = require('../widgets/SomeOtherCustomView')(); //[ERROR] : Script Error Couldn't find module: ./widgets/SomeOtherCustomView Project from guide example attached

Attachments

FileDateSize
test path.zip2014-03-21T15:22:30.000+0000639893

Comments

  1. Ritu Agrawal 2014-03-31

    Moving this ticket to engineering based on Mr. Rahman's verification.
  2. Christopher Williams 2018-11-16

    This ticket is quite outdated, this should work fine now.

JSON Source