I am reading through the gjs guide on imports and modules and I came across the statement below.
Modules are searched in paths defined in the array
imports.searchPath. You can modify the value of
imports.searchPathto include the directories where to look for modules.
When you look at
utils.js file, the comment on the first line indicates something is being exported and it is being used in
row.js. Nothing is being added to
imports.searchPath. My assumption is, builder is adding the modules behind the scenes.
But when I try to do the same, I get the error below,
JS ERROR: ImportError: No JS module ‘dialog’ found in search path
What is going on here that nobody seems to be talking about? How do I ensure my modules are added to the search path just like in Gnome sound recorder.