mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Allow a user to install missing modules from project settings
This commit is contained in:
@@ -344,24 +344,24 @@
|
||||
"sortRecent": "recent",
|
||||
"more": "+ __count__ more",
|
||||
"errors": {
|
||||
"catalogLoadFailed": "Failed to load node catalogue.<br>Check the browser console for more information",
|
||||
"installFailed": "Failed to install: __module__<br>__message__<br>Check the log for more information",
|
||||
"removeFailed": "Failed to remove: __module__<br>__message__<br>Check the log for more information",
|
||||
"updateFailed": "Failed to update: __module__<br>__message__<br>Check the log for more information",
|
||||
"enableFailed": "Failed to enable: __module__<br>__message__<br>Check the log for more information",
|
||||
"disableFailed": "Failed to disable: __module__<br>__message__<br>Check the log for more information"
|
||||
"catalogLoadFailed": "<p>Failed to load node catalogue.</p><p>Check the browser console for more information</p>",
|
||||
"installFailed": "<p>Failed to install: __module__</p><p>__message__</p><p>Check the log for more information</p>",
|
||||
"removeFailed": "<p>Failed to remove: __module__</p><p>__message__</p><p>Check the log for more information</p>",
|
||||
"updateFailed": "<p>Failed to update: __module__</p><p>__message__</p><p>Check the log for more information</p>",
|
||||
"enableFailed": "<p>Failed to enable: __module__</p><p>__message__</p><p>Check the log for more information</p>",
|
||||
"disableFailed": "<p>Failed to disable: __module__</p><p>__message__</p><p>Check the log for more information</p>"
|
||||
},
|
||||
"confirm": {
|
||||
"install": {
|
||||
"body":"Before installing, please read the node's documentation. Some nodes have dependencies that cannot be automatically resolved and can require a restart of Node-RED. ",
|
||||
"body":"<p>Installing '__module__'</p><p>Before installing, please read the node's documentation. Some nodes have dependencies that cannot be automatically resolved and can require a restart of Node-RED.</p>",
|
||||
"title": "Install nodes"
|
||||
},
|
||||
"remove": {
|
||||
"body":"Removing the node will uninstall it from Node-RED. The node may continue to use resources until Node-RED is restarted.",
|
||||
"body":"<p>Removing '__module__'</p><p>Removing the node will uninstall it from Node-RED. The node may continue to use resources until Node-RED is restarted.</p>",
|
||||
"title": "Remove nodes"
|
||||
},
|
||||
"update": {
|
||||
"body":"Updating the node will require a restart of Node-RED to complete the update. This must be done manually.",
|
||||
"body":"<p>Updating '__module__'</p><p>Updating the node will require a restart of Node-RED to complete the update. This must be done manually.</p>",
|
||||
"title": "Update nodes"
|
||||
},
|
||||
"cannotUpdate": {
|
||||
|
@@ -99,7 +99,10 @@ function installModule(module,version) {
|
||||
}
|
||||
|
||||
var installDir = settings.userDir || process.env.NODE_RED_HOME || ".";
|
||||
var child = child_process.execFile(npmCommand,['install','--save','--save-prefix="~"','--production',installName],
|
||||
|
||||
var args = ['install','--save','--save-prefix="~"','--production',installName];
|
||||
log.trace(npmCommand + JSON.stringify(args));
|
||||
var child = child_process.execFile(npmCommand,args,
|
||||
{
|
||||
cwd: installDir
|
||||
},
|
||||
@@ -186,7 +189,11 @@ function uninstallModule(module) {
|
||||
|
||||
var list = registry.removeModule(module);
|
||||
log.info(log._("server.install.uninstalling",{name:module}));
|
||||
var child = child_process.execFile(npmCommand,['remove','--save',module],
|
||||
|
||||
var args = ['remove','--save',module];
|
||||
log.trace(npmCommand + JSON.stringify(args));
|
||||
|
||||
var child = child_process.execFile(npmCommand,args,
|
||||
{
|
||||
cwd: installDir
|
||||
},
|
||||
|
Reference in New Issue
Block a user