Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect module resolution #334

Closed
slavchev opened this issue Jan 14, 2016 · 0 comments
Closed

Incorrect module resolution #334

slavchev opened this issue Jan 14, 2016 · 0 comments

Comments

@slavchev
Copy link

As reported here

Steps to reproduce

tns create app1
cd app1
tns platform add android
npm install moment
[see the code fragment below]
var moment = require("moment");

moment.locale("fr");
console.log(moment.locale()); // "fr" expected
var m = moment();
m.locale("da");
console.log(m.locale()); // "da" expected

The first time moment module is resolved as

/data/data/<app package>/files/app/tns_modules/moment/./moment.js

And the second time moment module is resolved as

/data/data/<app package>/files/app/tns_modules/moment/moment.js

Should always use canonical paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants