‘.’ is not recognized

Hello, I have been trying to make a commit but I get this error

husky > commit-msg hook failed (add --no-verify to bypass)

I did npm install

$ npm install

training@1.0.0 postinstall D:\fluid\training
./ci-scripts/commitlint-conf.sh

‘.’ is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! training@1.0.0 postinstall: ./ci-scripts/commitlint-conf.sh
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the training@1.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Looks like you’re running the command from Windows, you need Linux, or at least a shell to do this.

image
Running in Ubuntu and getting the same error :confused:

Can you please attach logs of the npm install command in ubuntu?

Also, make sure you have curl installed.

You should also check the path where you are running the npm command, if you don’t have a config file (such as package.json) in the same folder the command will not succeed, make sure you are running it at the root of the repo.

Tried to emulate the OP’s situation in a vanilla ubuntu docker container, got the same error.
Installing curl fixed it.
Perhaps not redirecting stderr to /dev/null or first testing for which curl would have shown that was the problem?
curl $COMMITLINT_RULES_URL > $COMMITLINT_RULES_NAME 2> /dev/null

3 Likes

Yes, the problem was with Curl, and I had proxy configuration so the curl connected to localhost instead of going out to the internet

If the issue is solved, please mark the thread as such.