Getting the JS Files from TS files in a plugin


#1

Hello,

I done this before a while back, but cannot seem to figure this out now.

I forked a repository and made a couple changes:

and then in my package.json I added this:

“nativescript-google-maps-sdk”: “randy-johnson/nativescript-google-maps-sdk”,

when I do a tns run android I am getting this error:
com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Failed to find module: “nativescript-google-maps-sdk”, relative to: app/tns_modules/

I think the issue may be that I do not have the corresponding JS files for the TS files in the repo and since my app isn’t a TS app that is the issue. Specifically these files: https://goo.gl/0jF93X

I think I remember last time having to commit the js files to the repo, but for the life of me I cannot recall how those js files got generated.

Thank you for your help.

Randy


#2

Run the typescript compiler - tsc


#3

Too easy. Thank you very much. That is exactly what I needed. tsc filename on each of the ts files. There was a bunch of TS errors on the screen but the files converted anyway and seem to be working fine.