I have succesfully installed nodered on my raspberry-pi.But the problem is each time i write a flow,i have to save the flow into flows_raspberrypi.json and restart nodered server. How to make it automatically save the nodes.
相关问题
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- google-drive can't get push notifications
- How to reimport module with ES6 import
- Why is `node.js` dying when called from inside pyt
- How to verify laravel passport api token in node /
相关文章
- node连接远程oracle报错
- How can make folder with Firebase Cloud Functions
- @angular-cli install fails with deprecated request
- node.js modify file data stream?
- How to resolve hostname to an ip address in node j
- Transactionally writing files in Node.js
- Log to node console or debug during webpack build
- Get file created date in node
2 possible things.
1) If you created there flow file by hand then you probably need to create a file called flows_raspberrypi_creds.json containing:
{}
2) assuming no errors in either the flow file or the creds file then node-red will load a file based on the machines hostname to start with, you can override this by passing a name on the command line:
$node red bob
will load bob.json & bob_creds.json
If neither of those work run
node red -v
to show more detailed error messages.I had the same problem, eventually figured out that node-red was loading my flows from:
This is supposed to be controlled by the settings.js file in your main node-red directory. Although mine was commented out, which is supposed to then load the flows from the main install directory.
To fix mine I edited my settings.js located in the node-red main install folder by changing this:
to this:
It looks like a fault with node-red to me, will have a quick look when I get chance to see if I can see the code in their Git repository causing the problem. If I can't figure it out I will raise an issue.
Your username could be different to my default pi one, if so just change the line above to reflect your username.
Also delete any files that are in your /home/pi/.node-red/ folder. I had:
Until these were deleted and node-red restarted I got node not deployed errors and other strange problems.
Hopefully this will fix it for you like it did for me.