RangerMauve / hyper-sdk

Make your own hyper apps!
https://www.youtube.com/watch?v=HyHk4aImd_I&list=PL7sG5SCUNyeYx8wnfMOUpsh7rM_g0w_cu&index=20
MIT License
290 stars 46 forks source link

Error: Hyperdrive is not a constructor #4

Closed ninabreznik closed 5 years ago

ninabreznik commented 5 years ago

Hey,

I am trying to run the example code from the readme and get this error. There was also a closing single quote typo (did a PR for that), but now it throws this error.

Any idea what this could be?

Screenshot_2019-07-17_00-20-08

martinheidegger commented 5 years ago

Hyperdrive - or hypercore for that matter - does not provide a constructor!

https://github.com/datproject/sdk/blob/15d85c96e29bc74716ec8904c8eb051f9afd7222/index.js#L80-L88

@RangerMauve is that good? The documentation certainly will need updating?

RangerMauve commented 5 years ago

Whoops! It should be working with or without new. I'll fix it next week since I'm about to go off to dweb camp. 😁

Try using it without new for now. Sorry!

ninabreznik commented 5 years ago

Have fun at the dweb. Say hi to everyone (Karissa, Noffle, MixMix etc.)

RangerMauve commented 5 years ago

Updated the docs to account for this.

tl;dr Don't use new!