Description
*This is not a regression occurs using 5.5.1.GA stack*
When using
__dirname
in an app.js file the following is thrown
*Using __dirname in any file other than app.js works*
[ERROR] : Application Error: {
[ERROR] : "line": 2,
[ERROR] : "column": 10,
[ERROR] : "message": "require: Error while require(/app) Can't find variable: __dirname",
[ERROR] : "native_stack": [
[ERROR] : "JSExportClass<class Titanium::GlobalObject>::CallNamedFunction"
[ERROR] : ]
[ERROR] : }
Steps to reproduce
In your app.js add console.log(__dirname)
Build for Android
Actual result
The above error is thrown
Expected result
__dirname should be able to be used in app.js file
PR: https://github.com/appcelerator/titanium_mobile/pull/10247 Test-case can be seen via the original iOS ticket.