[Beginner] Is it possible to use core nodejs modules when developing firefox addons

9 views
Skip to first unread message

erdem kemer

unread,
Mar 20, 2016, 10:54:43 AM3/20/16
to mozilla-labs-jetpack

I am confused about one thing. When developing firefox extensions using JPM, Can we


use 3rd party modules added with npm ? use core nodejs modules ? (like 'net')

When i add 3rd party modules using npm, some modules can be loaded but some modules fails giving error message:


Message: Module xxx is not found at resource://gre/modules/commonjs/xxx.js


Some examples would be 'net' and 'util' modules.


Is there a way to make firefox add-ons, core nodejs modules (like 'net') ?


(Btw i am trying to ping ip:port in extension, so i need to be able to see if it is possible to connect that ip using that port within x seconds, if there is already another builtin module of jpm, i can also use it. But could not find yet.


thanks


Reply all
Reply to author
Forward
0 new messages