Reputation: 61
I'm trying to install mattlewis92's angular 14.0+ calendar, which suggests the use of the command ng add angular-calendar
. However when doing so I got an error:
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c husky install
npm ERR! 'husky' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
I realized that I don't have husky as a dependency so I added it according to husky's docs. Unfortunately after installing husky I got a new error:
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c husky install
npm ERR! husky - .git can't be found (see https://typicode.github.io/husky/#/?id=custom-directory)
I followed the suggested link above huksy docs/ Recipes/ Custom directory, but I have no common problem as package.json as well as .git and .husky are all in the same directory level -> in my project's root folder.
All suggestions are welcome!
Upvotes: 5
Views: 9631
Reputation: 449
In my case, everything was fine except parent folder of the project had .git
.
Husky found a problem as .git
in parent folder whereas project in child folder of it.
I removed .git
from parent folder as git was mistakenly init in parent folder.
Upvotes: 0
Reputation: 8573
You could
This is the accepted node js version found over their website
Node.js (>=14.19.0 or >=16.9.0)
So if, you do not have those version -> update it.
You do not want to update your node.js version ?
Downgrade to the following -> angular-calendar: 0.29.0
The library cannot install the calendar-utils
.
Funnily enough, running npm i angular-calendar
outside an angular project worked just fine
So what you can do.
npm i angular-utils
somewhere outside an angular projectnode_modules
, package.json
& package-lock.json
inside your projectnpm i angular-calendar
ng add angular-calendar
should work just fine.Upvotes: 0