mafintosh / mafintosh/mirror-folder

Example from dat cookbook doesn't produce any files

Open
#16 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
87
Forks
26
PR merge metrics
No merged PRs in 30d

Description

I am trying to run the [second node.js example from the dat cookbook](https://docs.datproject.org/diy-dat#download-all-files-to-computer) where `mirror-folder` is used to copy all files from a dat to a local folder. I copied the code from the example verbatim to a file `index.js`. When I run

$ node index.js dat://....

a folder `dat-download` is created but it doesn't contain any files. The console shows:

```
pv@pv:dat-test$ node mirror.js dat://2714774d6c464dd12d5f8533e28ffafd79eec23ab20990b5ac14de940680a6fe
done downloading!
```

I tried several different dat addresses other than the [rotonde-client](dat://2714774d6c464dd12d5f8533e28ffafd79eec23ab20990b5ac14de940680a6fe) address, none of which worked. The other example from the cookbook, where only one specific file is downloaded does work.

I also installed the `mirror-folder` lib separately and ran `npm test`, which produced no errors.

Which steps could I take to find out why this is not working?

I'm on osx 10.13.4

```
pv@pv:dat-test$ node -v
v9.11.1
pv@pv:dat-test$ npm -v
6.0.0
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the second node.js example in the linked dat cookbook and reproduce it using index.js or mirror.js, the supplied dat address, and the reported Node and npm versions. Read the mirror-folder behavior around the npm test suite and the download completion message; done means identifying why dat-download stays empty or documenting the missing reproduction detail needed to fix it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.