Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25349] Android: Unable to require a file without a correct extension

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionWon't Fix
Resolution Date2018-11-14T15:59:15.000+0000
Affected Version/sRelease 7.0.0, Release 6.3.0, Release 6.2.2
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterEwan Harris
AssigneeYordan Banev
Created2017-09-26T13:18:51.000+0000
Updated2018-11-14T15:59:15.000+0000

Description

Description

When requiring a file if the file doesn't have a correct extension (.js, .json) then the file will not be able to be loaded. For example when having a file test.test and explicitly requiring 'test.test' I would expect (based off other platforms and node.js behaviour) there to be no error.

Steps to reproduce

Create a file under resources called test.test with the contents exports.foo = 'bar';

Add alert(require('./test.test').foo); to your app.js

Actual

Unable to find module

Expected

An alert with 'foo' should show

Comments

  1. Ewan Harris 2018-07-10

    Apologies for missing your ping [~ybanev] I guess not, I'd be fine closing this as wont fix, I can't remember why I filed it (I think something mocha-suite related), so it can't be that important :) But i'll let you, Gary, and Josh decided the fate :)

JSON Source