mento-protocol / mento-sdk

An SDK for integrating applications with the Mento protocol
MIT License
1 stars 3 forks source link

Investigate installation due to mento-core-ts dependency #60

Open nvtaveras opened 1 month ago

nvtaveras commented 1 month ago

Reported by aaron from cLabs:

hey when i use the mento-sdk the sub dependency @mento-protocol/mento-core-ts tries to run husky install. i didnt notice it at first as i have husky but when users do not have it it prevents the entire package from installing.

`
➜  fresh npm install @mento-protocol/mento-core-ts
npm error code 127
npm error path /Users/aaronderuvo/fresh/node_modules/@mento-protocol/mento-core-ts
npm error command failed
npm error command sh -c husky install
npm error sh: husky: command not found
npm error A complete log of this run can be found in: /Users/aaronderuvo/.npm/_logs/2024-08-07T09_40_36_176Z-debug-0.log
aaronmgdr commented 1 month ago

note that with yarn and pnpm there is not an issue

aaronmgdr commented 1 month ago

the package uses pinst to transfer postinstall into _postinstall which i guess is supposed to mean this shouldnt happen. but npm seems to not care and still run.

If you do a search for husky in package.json most have it run on prepare which aligns with how https://www.npmjs.com/package/postinstall says the two commands are to be used

prepare use it to transform devDependencies, while developing or before publishing postinstall use it to deploy dependencies.

aaronmgdr commented 1 month ago

same as https://github.com/mento-protocol/mento-core-ts/issues/13

aaronmgdr commented 1 month ago

can be closed due to https://github.com/mento-protocol/mento-core-ts/pull/14