Hi there
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 ofimports.searchPath
to include the directories where to look for modules.
However, when I look at the source code for Gnome sound recorder, nobody seems to be adding a module path to imports.searchPath
as suggested here.
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.