okdistribute / dat-server

A web ui and http interface for archiving dats.
45 stars 4 forks source link

On adding a new dat, getting a hyperdrive error #8

Open ryanramage opened 6 years ago

ryanramage commented 6 years ago
> dat-server@1.0.1 start /Volumes/untitled/github/forks/dat-server
> npm run watch & node cli.js

> dat-server@1.0.1 watch /Volumes/untitled/github/forks/dat-server
> watchify -t [ babelify --presets [ react ] ] frontend.js -o static/bundle.js

http://localhost:8080
listening
/Volumes/untitled/github/forks/dat-server/node_modules/hyperdrive-archiver/node_modules/hyperdrive/index.js:878
      return storage(path.join(folder, 'content', name))
             ^

TypeError: storage is not a function
    at Storage.content [as create] (/Volumes/untitled/github/forks/dat-server/node_modules/hyperdrive-archiver/node_modules/hyperdrive/index.js:878:14)
    at Storage.openKey (/Volumes/untitled/github/forks/dat-server/node_modules/hyperdrive-archiver/node_modules/hypercore/lib/storage.js:154:34)
    at Storage.openKey (/Volumes/untitled/github/forks/dat-server/node_modules/hyperdrive-archiver/node_modules/hypercore/lib/storage.js:153:47)
    at Feed._open (/Volumes/untitled/github/forks/dat-server/node_modules/hyperdrive-archiver/node_modules/hypercore/index.js:182:17)
    at open (/Volumes/untitled/github/forks/dat-server/node_modules/hyperdrive-archiver/node_modules/hypercore/index.js:97:10)
    at run (/Volumes/untitled/github/forks/dat-server/node_modules/hyperdrive-archiver/node_modules/thunky/index.js:19:5)
    at Feed.thunk [as _ready] (/Volumes/untitled/github/forks/dat-server/node_modules/hyperdrive-archiver/node_modules/thunky/index.js:13:5)
    at new Feed (/Volumes/untitled/github/forks/dat-server/node_modules/hyperdrive-archiver/node_modules/hypercore/index.js:82:8)
    at Feed (/Volumes/untitled/github/forks/dat-server/node_modules/hyperdrive-archiver/node_modules/hypercore/index.js:26:39)
    at done (/Volumes/untitled/github/forks/dat-server/node_modules/hyperdrive-archiver/node_modules/hyperdrive/index.js:789:62)
ryanramage commented 6 years ago

Sorry have not had time to look closer. WIll have a peek more this weekend.

okdistribute commented 6 years ago

Are you sure you're using the latest versions of all the dependencies? Try rm -rf node_modules && npm install

ryanramage commented 6 years ago

Yeah I tried and with no luck. Also I tried locking down the versions to the exact ones specified in the package.json, and that did not help either.

okdistribute commented 6 years ago

@ryanramage can you try now? just published a new version of dat-server

ryanramage commented 6 years ago

@karissa I updated dat-server, rm -r node_modules, npm i, npm start

Still same error. This does not happen for you by chance?

My node and npm version

[dat-server]$ git log
commit 0abc22d66b6064713e798b23805992511ddfeb8f
Author: karissa <krmckelv@gmail.com>
Date:   Fri Oct 20 16:24:27 2017 -0700

    1.0.2
®[dat-server]$ node -v
v8.7.0
®[dat-server]$ npm -v
5.4.2
victorperin commented 6 years ago

Hello guys, I'm getting the same error here too. I could get sometime digging arround it to see whats the problem.