in my environment,i import project ,nodejs directory has node.exe,data directory has two db documents(temp.db、test.db) , i config node find "./data/temp.db" can execute,but test.db appears error failed to open "./data/test.db",so i change config "../data/test.db" is working;
in others environment ../data/test.db、./testdb both not working
absolute directory is working,how to debug
You may need to post part of your settings.js
file which shows what paths are shared.
Oh, sorry, some other details:
O/S being used
NR version
Ah, windoze.......
Not my area. I'd better step back and let others help you.
None of this is really necessary.
Since data
is relative to the settings.js, you should be able to specify a relative path data/test.db
in the SQL node.
if that is what you entered, then there is no surprise.
if you really entered data/test.db
then something else is amiss.
did you remove your extra code in settings.js process.chdir(newPath);
and restart node-red?.
If you add a simple flow inject -> exec -> debug
and put cd
in the command, what do you get when inject is operated?
You say:
Then you say:
so I cannot really understand what you are saying.
Maybe you have a lock on the database. try closing any database management applications. try restarting the computer.
also, check you have not got more than one db config node configured for the same database (you have 2 database files, there should only be 2 configs in the dropdown)
I'm sorry but you are changing things and only reporting small parts of info making it very difficult to help.
- show me the files in
data
dir - show me the output of
cd
using the flow I suggested above - show me the settings in the 2 configs.
- 1 should have
data/test.db
- 2 should have
data/temp.db
- 1 should have
Do this ↓
THERE SHOULD BE 2 CONFIGS for 2 DATABASE CONNECTIONS
Select 1st one then click edit
Select 2nd one then click edit
after 6 hours i can reply,because i am first ,offical is limit
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.