diff --git a/lib/agent.js b/lib/agent.js index d2241c1..4937006 100644 --- a/lib/agent.js +++ b/lib/agent.js @@ -263,7 +263,14 @@ class Agent { } if (this.launcher) { const { modules } = await this.launcher.readPackage() - state.nodeRed = modules['node-red'] + if (module['node-red'] != 'latest') { + state.nodeRedVersion = modules['node-red'] + } else { + const nrPackPath = path.join(this.launcher.projectDir, 'node_modules/node-red/package.json') + const content = await fs.readFile(nrPackPath) + const packJSON = JSON.parse(content) + state.nodeRedVersion = packJSON.version + } } if (this.currentMode === 'developer' && this.editorToken && this.editorAffinity) { state.affinity = this.editorAffinity