Anchor-Protocol / anchor-earn

The Earn JavaScript SDK for Anchor Protocol.
Apache License 2.0
45 stars 24 forks source link

minor: installation with npm fails: prepare script, git hooks, and dependencies #23

Closed crypt0grapher closed 3 years ago

crypt0grapher commented 3 years ago

Once pulled, npm install gives sh: husky: command not found. That's because husky 5 is both set as a dev dependency and part of prepare script in package.json. yarn installs husky and doesn't give an error. However prepare is not the yarn 2+ lifecycle script anymore.

This shouldn't be the case for husky v4, but for v5 prepare could run a shell script executing husky installation with npx if no .husky folder is preset. Also, if yarn is still recommended as per readme file, probably using getting rid of prepare and using prepublish only would unify the usage for both npm and yarn.

PFC-developer commented 3 years ago

weird.. the automated build should have picked this up.. as it is using npm . does this happen with the new PR in there?

crypt0grapher commented 3 years ago

yep, it was, I've tested on a few more images with the latest PR and it worked out just fine. So, once the npm registry is updated with the v2 of anchor-earn, I'll test once more and close the thread.

PFC-developer commented 3 years ago

they don't let me do that kinda thing @cosullivan .. any chance of pushing it?

cosullivan commented 3 years ago

@petes-fan-club I've published this to NPM as 2.0.0-alpha1

crypt0grapher commented 3 years ago

Thanks @cosullivan , @petes-fan-club. It works perfectly fine for me with the regular npm package. I'm closing the ticket.