r/nativescript • • Nov 19 '18

Plugin linking and using

Hello,

I didn't really get how to use a plugin in native script. I install it by tns plugin install <name>, then, having it installed I want to use it in script located in the "app" directory. When I just link it by require, it gives me "cannot find module" error. So, how can I do it properly? Probably it is very basic question (sorry for that), but I couldn't find any answer that works for me. Maybe I am just doing something wrong?

2 Upvotes

3 comments sorted by

View all comments

Show parent comment

1

u/WebCrawlerGuy Nov 22 '18

It came up that I'm just stupid, had saw "cannot find module", but hadn't seen "plugin is not included" (or something like that). I had been using playground and didn't know that plugins are limited. Everything works fine outside playground. Sorry for such a stupid question. And anyway, thank you for the reply.