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
@@ -247,6 +248,60 @@ Total 1 errors, 0 warnings, 0 other severities
247
248
{"input":"fear: do not fear for commit message","issues":[{"description":"type 'fear' is not allowed, you can use one of [build chore ci docs feat fix perf refactor revert style test]","name":"type-enum","severity":"error"}]}
248
249
```
249
250
251
+
## Common Installation Issues
252
+
253
+
If you encounter the `command not found: commitlint` error after installing `commitlint`, this likely means the binary is not in your system's `PATH`. Follow these steps to resolve this issue:
254
+
255
+
1.**Ensure `GOPATH/bin` is in your `PATH`**:
256
+
By default, Go installs binaries to `$GOPATH/bin` or `$HOME/go/bin` if `GOPATH` is not set. Add this directory to your `PATH`:
257
+
258
+
```bash
259
+
export PATH=$PATH:$GOPATH/bin
260
+
```
261
+
262
+
Or, if `GOPATH` is not set:
263
+
264
+
```bash
265
+
export PATH=$PATH:$HOME/go/bin
266
+
```
267
+
268
+
Add this line to your shell configuration file (e.g., `~/.bashrc`, `~/.zshrc`) to make the change permanent:
269
+
270
+
```bash
271
+
echo'export PATH=$PATH:$HOME/go/bin'>>~/.zshrc
272
+
source~/.zshrc
273
+
```
274
+
275
+
2.**Verify the Installation**:
276
+
Confirm that the `commitlint` binary is in the expected directory:
277
+
278
+
```bash
279
+
ls $GOPATH/bin/commitlint
280
+
```
281
+
282
+
Or:
283
+
284
+
```bash
285
+
ls $HOME/go/bin/commitlint
286
+
```
287
+
288
+
3.**Reinstall if Necessary**:
289
+
If the binary is missing, reinstall `commitlint`:
290
+
291
+
```bash
292
+
go install github.com/conventionalcommit/commitlint@latest
293
+
```
294
+
295
+
4.**Post-Verification**:
296
+
After following these steps, try running `commitlint` again:
297
+
298
+
```bash
299
+
commitlint init --global
300
+
```
301
+
302
+
This should allow `commitlint` to be recognized as a command in your terminal.
0 commit comments