Anchor-Protocol / anchor-earn

The Earn JavaScript SDK for Anchor Protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

crypt0grapher opened this issue · comments

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.

commented

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

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.

commented

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

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

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