[TIMOB-24170] LiveView breaks relative path usage in require
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2017-09-06T06:47:06.000+0000 |
| Affected Version/s | Release 6.0.0 |
| Fix Version/s | n/a |
| Components | Android, iOS, LiveView |
| Labels | LiveView, alloy, path, relative, require |
| Reporter | Brenton House |
| Assignee | Feon Sua Xin Miao |
| Created | 2016-11-23T18:58:11.000+0000 |
| Updated | 2018-08-06T17:57:34.000+0000 |
Description
When requiring a module using relative paths, an app will error out if LiveView is running.
var require_absolute_path = require('/test/myModule');
console.error('require_absolute_path: ' + require_absolute_path);
var require_relative_path = require('./myModule');
console.error('require_relative_path: ' + require_relative_path);
[INFO] [LiveView] Error Evaluating /test/requireTest.js @ Line: <null>
[ERROR] Couldn't find module: ./myModule for architecture: x86_64
[ERROR] File: /test/requireTest.js
[ERROR] Line: <null>
[ERROR] SourceId: <null>
[ERROR] Backtrace:
[ERROR] undefined
[~brentonhouse] Is this only happening on 6.0.0+? And is it iOS, Android or both?
[~hansknoechel] I will test on Android and update the ticket with findings.
Failed on Android as well:
PR: https://github.com/appcelerator/liveview/pull/105
[~ssekhri] Are you doing the FR for this one? This one should be a Studio FR.
[~amukherjee] As soon as it is merged into studio. The merge ticket is already planned for this sprint but we would take it on priority.
[~ssekhri] This ticket should actually be a Studio 4.10 ticket. Would you be able to move the fixVersion to the correct version?
Fixed in liveview@1.2.1.
Cleaning up older fixed tickets from 2016 and earlier. If this ticket should not have been closed, please reopen it.