This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
jsipfs : how to use exist node in node.js #953
Comments
Hi @kappabooom, you are telling the node to "init the repo" again with the option "init: true". You can get your issue solved and simplified by just having:
|
@diasdavid Thanks for your answer~ but I got some troubles on use 'repoPath' , it will appear error " Error: repo already exists", when I run the code:
|
Right. My bad, that is because it defaults to init the repo. Do:
On the second time |
@diasdavid Yes, I solved this problem. Thank you very much!!! |
wooot @kappabooom :D |
Is there a way to tell it to init the repo if it hasn't already been inited, and not otherwise ? |
This was referenced Feb 11, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Type: question
Severity: medium
Description:
when I run node.js , the function
(const node = new IPFS({
init: true,
start: true,
repo: repoPath)}
)
will produce the new node again, hence I can't change the config in this node, because I don't know how to use the node I had produced.
Steps to reproduce the error:
The text was updated successfully, but these errors were encountered: