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

TNS and Dependances vs DevDepandancies #1989

NathanaelA opened this Issue Aug 10, 2016 · 1 comment


None yet
3 participants

NathanaelA commented Aug 10, 2016

I was helping @NathanWalker tonight with an issue; and it "appears" tns makes the assumption that if the module is NOT listed in the main package.json file devDependancy; that it is a valid dependency.

However, when dealing with some larger projects a devDependancy will install its own devDependancies; and TNS will see these as "Dependancies" and copy them into /platforms/android/src/main/assets/app/tns_modules/ -- then the gradle builder system will attempt to use them as valid dependancies. In Nathan's case; the tar and tar-pack that are pulled in by the gyp tooling were being copied and attempted to be processed. Which would cause the android tooling to fail with an error that I would bet you that Nathan would tell you is very unhelpful.

I believe this is a flawed assumption to assume anything not listed as a direct "devDependancy" is a valid dependancy. I assume the best way to fix this would be to actually iterate through all the package.json files and make a real dependency tree -- probably cache it in the node_modules (use foldernames and main package.json file as as hash name. I would also probably recommend that you make tns require npm 3 or later so that everything is installed in the node_modules folder rather than in sub-directories of the plugins, as this should make this a lot simpler to manage.


This comment has been minimized.


Plamen5kov commented Nov 14, 2016

fixed for 2.4.0 release.

@Plamen5kov Plamen5kov closed this Nov 14, 2016

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