简体   繁体   中英

IBM bluemix - NodeRED - failed to install node-red-contrib-chatbot

I'm trying to install redbot in Node-RED, on IBM Bluemix. As suggested here , I'm using Manage palette to install it. I can find it in 'install' tab by typing chatbot . I click on install and then a pop up appears saying:

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.

I click on install again, and after loading a little bit, it shows this message:

Failed to install: node-red-contrib-chatbot Error: install failed Check log for more information

And the debug tab shows this error message:

Error: Command failed: npm install --production node-red-contrib-chatbot

I tried to install dependences listed here following the same procedure described in this post, but some of them can't be found from Manage palette . I also tried restarting Node-red but without success.

Is there any alternative? How should I install this properly?

You can only install Node-RED nodes via the manage palette system, not the underlying npm nodes.

The best way to install Node-RED nodes that won't install cleanly via the manage palette option is to edit the Node-RED package.json The easiest way to do this is to go to the Overview page for the application console page in Bluemix. From here click "Edit Code". From here you want to edit the package.json to include node-red-contrib-chatbot in the dependencies section.

"dependencies": {
  "node-red-contrib-chatbot": "0.7.1",
  ...
},

Once you've made the changes you will need to commit and push the changes, this should restart Node-RED and as part of this the node should be installed.

What hardililb says but if the issue is with all nodes - ie you cannot add any node, not even a simple one like random, via the Manage Palette, you can fix that. Edit bluemix_settings.js and add:

var fs = require("fs");

Then after the var settings= section (not in it, after it), add:

   // Ensure userDir exists 
fs.mkdirSync(settings.userDir);
fs.mkdirSync(path.join(settings.userDir,"node_modules"));

Commit and Push.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM