You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the template completely before filling it in.
Context
When installing 1.2.0 version of materializecss into our project via npm i an issue occurs.
This does not occur when installing version 1.1.0.
Current Behavior
npm ERR! code 1
npm ERR! path [redacted]\node_modules\@materializecss\materialize
npm ERR! command failed
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.
Expected behavior
Expected the npm i command to complete without an error.
Possible Solutions or Causes
Husky is included under devDependencies in package.json but is being ran as a postinstall script by the end user.
According to the Husky docs, you cannot include husky install as a postinstall without using pinst. I am not sure if this is the root cause or not, but wanted to bring this to your attention:
OtherLeadingBrand
changed the title
[Bug]:
[Bug]: Husky error occurs when installing package via npm i into a project
Nov 28, 2022
OtherLeadingBrand
changed the title
[Bug]: Husky error occurs when installing package via npm i into a project
[Bug] [build]: Husky error occurs when installing package via npm i into a project
Nov 28, 2022
OtherLeadingBrand
changed the title
[Bug] [build]: Husky error occurs when installing package via npm i into a project
[Bug]: Husky error occurs when installing package via npm i into a project
Nov 28, 2022
Ah ok, i will look into this in detail.
Thanks for the detailed review.
I really dont know the mechanics of postinstall in detail, I found a tutorial online and it worked from there, maybe we can remove the postinstall command without damaging the functionality.
Before submitting...
Context
When installing 1.2.0 version of materializecss into our project via
npm i
an issue occurs.This does not occur when installing version 1.1.0.
Current Behavior
Expected behavior
Expected the
npm i
command to complete without an error.Possible Solutions or Causes
Husky is included under devDependencies in package.json but is being ran as a postinstall script by the end user.
According to the Husky docs, you cannot include husky install as a postinstall without using pinst. I am not sure if this is the root cause or not, but wanted to bring this to your attention:
https://typicode.github.io/husky/#/?id=yarn-2
I assume since husky is a dev dependency, you never intended for your end users to run the postinstall script.
Steps to reproduce
@materializecss/materialize
in its package.json.npm i
to install the packagesYour Environment
The text was updated successfully, but these errors were encountered: