#Husky preventing commits

1 messages · Page 1 of 1 (latest)

frail pivot
#

I am trying to make a contribution to the hacksquad website but I cannot get past husky. I am using a conventional commit but getting the following error and would appreciate if someone knows how to interpret what is wrong: ```
Oops! Something went wrong! :(

ESLint: 8.23.0

Error: Cannot read config file: C:\Users\squig\Documents\Hacktober\2022\hacksquad-website\node_modules\eslint-config-airbnb\whitespace.js
Error: Command failed: C:\Users\squig\Documents\Hacktober\2022\hacksquad-website\node_modules\eslint-config-airbnb\whitespace-async.js
Referenced from: C:\Users\squig\Documents\Hacktober\2022\hacksquad-website.eslintrc.js
at checkExecSyncError (node:child_process:828:11)
at execSync (node:child_process:899:15)
at Object.<anonymous> (C:\Users\squig\Documents\Hacktober\2022\hacksquad-website\node_modules\eslint-config-airbnb\whitespace.js:54:38)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at Object.module.exports [as default] (C:\Users\squig\Documents\Hacktober\2022\hacksquad-website\node_modules\import-fresh\index.js:32:59)
husky - pre-commit hook exited with code 1 (error) ```

dense iron
#

@tacit turret <@&986960430528331776> <@&949961460384157746> Could one of you help here?

strong wyvern
pallid girder
#

I too came across the same issue.

frail pivot
pallid girder
waxen jungleBOT
#

@pallid girder, you just advanced to level 1!

tacit turret
#

@cosmic hatch @hollow holly @warm oak

cosmic hatch
#

What node version are you using?

frail pivot
pallid girder
frail pivot
cosmic hatch
#

Hm @frail pivot that should work I think

pallid girder
cosmic hatch
#

@frail pivot could you try to bump the versions of the eslint packages and see if that helps? If you need help to try that just tell me and we can look at it togther

frail pivot
#

They already seem to be on the latest versions

cosmic hatch
#

oh okay

frail pivot
#

Ok, I've googled and googled and can't find anything. I will use Diwash's hack for now and if there's something wrong with the PR maybe we can work it out from there.

waxen jungleBOT
#

@frail pivot, you just advanced to level 1!

cosmic hatch
#

@frail pivot are you on Windows as well?

#

anyway please create an issues for us so some awesome contributor could help us solve this 🙂

#

!issue

waxen jungleBOT
frail pivot
cosmic hatch
#

Yeah I understand the problem, not sure how to solve it on windows 😦

frail pivot
#

Now I just tried to merge main into my branch and husky flipped out again .husky/commit-msg: line 2: .husky/_/husky.sh: No such file or directory

#

So something somewhere is going wrong

cosmic hatch
#

yeah thanks for reporting it 🙂

frail pivot
#

I just made an issue. Hopefully someone can find out what's going on but for now I can't make my original PR.

cosmic hatch
#

thanks @frail pivot, not even with the work around?

frail pivot
#

No, it won't let me merge main into my branch 🤦🏻‍♀️

cosmic hatch
#

ah okay 😦 <@&943775970421264404> or <@&949961460384157746> any ideas here?

pallid girder
pallid girder
west blade
#

@tacit turret maybe worth removing husky as seems a lot of people having a problem with on the hacksquad website

pallid girder
amber sparrow
frail pivot
frail pivot
amber sparrow
# frail pivot I don't have nvm on my windows laptop

In the docs https://docs.npmjs.com/downloading-and-installing-node-js-and-npm they said

We strongly recommend using a Node version manager like nvm to install Node.js and npm. We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally.

I might be wrong but since husky is installed by npm it might be related to some point in your error.
Sorry, if it's not answering your question

frail pivot
#

but nvm isn’t available on windows 🤔 and I’ve not had problems on other projects using husky

waxen jungleBOT
#

@frail pivot, you just advanced to level 2!