searchModulesPaths
A list of paths for Profound.js to only search for modules. This setting is not used to setup library lists for IBM i jobs. Entries in this list are searched prior to entries in pathlist
.
Can be used in situations when adding entries into the “pathlist” would be undesirable. For example, to find modules and never have Profound.js attempt to add those entries into IBM i library lists, add the path to searchModulesPaths
intead of to pathlist
.
This setting is not used for locating Profound.js modules or files when running an application in a Workspace. In that case, only modules/files within the Workspace directory or a sub-directory can be used. Paths within a sub-directory must be specified as relative to the Workspace directory. If a program in a Workspace is called via PJSCALL or a proxy program, the IBM i library list is used to search for modules/files.
If using a subdirectory in a workspace, the workspace name and the nested directories/folders must be added to either searchModulesPaths or the pathlist to find the file. For example, add something like this to the searchModulesPaths: /workspaceName/folder1/folder2/...
The “searchModulesPaths” option is specified as an array of directories to search.
searchModulesPaths: [ "dir1", "dir1/subdir1", "dir2" ]
The searchModulesPaths is used to search directory paths for Node.js modules within the modules directory of the Profound.js instance. Like with pathlist
, searchModulesPaths
is used by APIs, such pjs.call(), when a module name is unqualified.
Unlike with pathlist
, no IBM i libraries should be specified in the searchModulesPaths
option.
This setting is available in Profound.js versions 7.14.0 and newer.
Click here for information on how to modify this setting.
Some documentation pages have recently moved to a new section: Profound AppDev. If you are having trouble finding specific pages, try the documentation search capability or reach out to our Support team!