react-screen-wake-lock icon indicating copy to clipboard operation
react-screen-wake-lock copied to clipboard

Installation error when using npm

Open anthony-j-castro opened this issue 1 year ago • 2 comments

I'm using npm as my package manager (version 10.8.2). When attempting to install this package in my project via npm install react-screen-wake-lock, I get the following error:

➜  npm install react-screen-wake-lock
npm error code 127
npm error path /new-project/node_modules/react-screen-wake-lock
npm error command failed
npm error command sh -c husky install
npm error sh: husky: command not found

You can reproduce this with a minimal project by creating a new folder, running npm init, and then try installing the package.

According to https://github.com/typicode/husky/issues/884, it looks like switching from the postinstall script for husky install to a prepare script should resolve this.

anthony-j-castro avatar Jul 16 '24 23:07 anthony-j-castro

Open since July 15th? Anyone has a solution that works?

YeonV avatar Oct 13 '24 00:10 YeonV

"npm install husky" is the workaround. Seems like an excessive dependency tho.

myklemykle avatar Oct 15 '24 04:10 myklemykle

:tada: This issue has been resolved in version 3.0.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Feb 26 '25 19:02 github-actions[bot]