Fix up loading of freshly installed modules in Function node

This commit is contained in:
Nick O'Leary
2021-02-12 22:40:30 +00:00
parent 9c09ee3b71
commit a94c19a6cf
2 changed files with 6 additions and 7 deletions

View File

@@ -137,7 +137,7 @@ async function checkFlowDependencies(flowConfig) {
}
})
return Promise.all(promises).then(() => {
return Promise.all(promises).then(refreshExternalModules).then(() => {
if (errors.length > 0) {
throw errors;
}
@@ -154,7 +154,8 @@ async function ensureModuleDir() {
const pkgFile = path.join(installDir,"package.json");
if (!fs.existsSync(pkgFile)) {
await fs.writeFile(path.join(installDir,"package.json"),`{
"name": "Node-RED External Modules",
"name": "Node-RED-External-Modules",
"description": "These modules are automatically installed by Node-RED to use in Function nodes.",
"version": "1.0.0",
"private": true,
"dependencies": {}