Skip to content

Common Issues

Madita Antonia Plogsties edited this page Mar 4, 2025 · 1 revision

How can I troubleshoot the error with Prettier in Windows?

  • Open the project's Terminal
  • Type git config -e anywhere
  • Add these two lines under [core] autocrlf = input and eol = lf
Do you use Nano ?

As reference you can try these following steps when using nano to edit git configuration.

  1. Paste two lines of code directly to the end of the paragraph to which [core] belongs, taking care to keep the indentation consistent with the other parameters
  2. Use Ctrl+O to save the changes made
  3. Use Ctrl+X to end the file changes.If you have modified the file, you will be asked below if you want to save the changes. Enter Y to confirm saving.
Do you use Vim ?

As reference you can try these following steps when using vim to edit git configuration.

  1. First switch from command mode to insert mode, press the letter i, or a
  2. Add the above two lines of content, pay attention to add content aligned with the format, retain the paragraph indentation
  3. Switch from insert mode to command mode, press esc.
  4. Exit vim and save the file, type :wq.

After adding, it may look like this

[core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
        symlinks = false
        ignorecase = true
        hooksPath = .husky
        autocrlf = input
        eol = lf
[remote "origin"]
        url = https://git.rwth-aachen.de/combi/lab/graph-visualiser.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
        remote = origin
        merge = refs/heads/main
  • Enter the commands in terminal, these three commands will reload all files with the correct line ending
git rm --cached -r .
git reset --hard
git checkout .
  • Formatting problems due to prettier are solved.

Pre-commit hook warns me that my commit is empty when trying to commit Rust format changes

This needs to be resolved and can be worked around using git commit -n. Please use this ONLY if you commit Rust formatted changes.

VScode reports an error in git commit? git: yarn run v...

1

This is because we use husky+lint-staged in the project to standardize the code. This means committing code with uniform formatting, such as tabs, spaces, etc. Under normal circumstances, yarn run start will tell you which places can be modified.

2

But sometimes yarn run start ignores these things. At this time, we need to run the code again, and then modify the code according to the prompts it gives.

Can't find the imported library after git pull?

3

In this case, we just need to reinstall the dependencies: yarn install

Clone this wiki locally