Add node_modules

Thread is closed for posting
2 posts, 0 answers
  1. Bruno
    Bruno avatar
    3 posts
    Member since:
    Apr 2015

    Posted 08 Apr 2015 Link to this post

    Good Afternoon, 


    Can we use node_modules on a NativeScript apps ? If we can, how can I require the library?


    Thanks in advance,


  2. Erjan Gavalji
    Erjan Gavalji avatar
    1455 posts

    Posted 09 Apr 2015 Link to this post

    Hi Bruno,

    A good question indeed! While we still don't have NPM node_modules as a first-class citizen in NativeScript CLI, we have it planned for the nearest future.

    For the time being, the only option is manually copying the js files of the third-party NodJS library and its dependencies to the tns_modules folder of your application and fixing their paths. This is tedious work for the maintenance is really costly, but at least it is an approach...

    We are working on getting the real NPM support though...

    Kind regards,
    Erjan Gavalji

    See What's Next in App Development. Register for TelerikNEXT.

Back to Top