Skip to content

Commit f519f5b

Browse files
committed
Set nodesDir to pickup theme
1 parent 9b73835 commit f519f5b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

lib/launcher.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,13 @@ class Launcher {
239239
},
240240
projectLink,
241241
assistant
242-
}
242+
},
243+
nodesDir: [
244+
// This path exists when running the agent as a git clone
245+
path.resolve(path.join(__dirname, '..', 'node_modules', '@flowfuse', 'nr-theme')),
246+
// This path exists when running the agent as an npm installed package
247+
path.resolve(path.join(__dirname, '..', '..', 'nr-theme'))
248+
]
243249
}
244250

245251
// if licensed, add palette catalogues
@@ -258,9 +264,8 @@ class Launcher {
258264
// if licensed, add shared library config
259265
const libraryEnabled = this.settings?.features ? this.settings.features['shared-library'] : false
260266
if (libraryEnabled && this.config.licensed) {
261-
settings.nodesDir = [
262-
path.join(__dirname, 'plugins', 'node_modules', '@flowforge', 'flowforge-library-plugin')
263-
]
267+
settings.nodesDir = settings.nodesDir || []
268+
settings.nodesDir.push(path.join(__dirname, 'plugins', 'node_modules', '@flowforge', 'flowforge-library-plugin'))
264269
const sharedLibraryConfig = {
265270
id: 'flowfuse-team-library',
266271
type: 'flowfuse-team-library',

0 commit comments

Comments
 (0)