Skip to content

Step 2 Correcting Windows Problems (Pre Vagrant Setup)

TBuscher137 edited this page Mar 11, 2016 · 17 revisions

If your operating system is Windows, then there is a high chance your system is not set up to work with this project.

First, chances are your Git is not set to keep line endings as \n instead of \r\n (also known as "line feed" LF as opposed to "carriage return line feed" CRLF). Follow these steps to correct it.

  1. In Git shell, git config --global core.autocrlf true
  2. In a non-formatted text editor (either such as Notepad or Notepad++ or through Git shell with vim or nano), save the following text into the file .gitattributes in your local repository's primary directory:
    # Auto detect text files and perform LF normalization
    * text=auto
    * text eol=lf
    
    # Custom for Visual Studio
    *.cs     diff=csharp
    
    # Standard to msysgit
    *.doc     diff=astextplain
    *.DOC     diff=astextplain
    *.docx    diff=astextplain
    *.DOCX    diff=astextplain
    *.dot     diff=astextplain
    *.DOT     diff=astextplain
    *.pdf     diff=astextplain
    *.PDF     diff=astextplain
    *.rtf     diff=astextplain
    *.RTF     diff=astextplain
    
  3. In Git shell, git add . -u Expect to see a few CRLF changed to LF-type outputs.
  4. In Git shell, git commit -m "Saving files before refreshing line endings"
  5. In Git shell, git rm --cached -r . Expect to see a lot of rm <file> as outputs.
  6. In Git shell, git reset --hard
  7. In Git shell, git add . Expect to see a lot of warning: CRLF will be replaced by LF in file as outputs
  8. In Git shell, git commit -m "Normalize all the line endings"

Second, your node.js package manager (npm) most likely will not work on Vagrant. Before installing Vagrant, follow these steps:

  1. If you have Windows 7+ Professional+ (i.e. Windows 7 or higher, Professional or higher):
    1. Use the "Run . . ." utility to open secpol.msc (may need administrator privileges)
    2. Under "Local Policies" > "User Rights Assignment", look for "Create symbolic links"
    3. If necessary, change the value stored there to include "Everyone" and "User"
    4. Verify that the value have been changed properly and exit out of secpol.msc
  2. If you have Windows 7+ Home/Home Premium, download and install the Polsedit utility from http://www.southsoftware.com/ and change the value similar to the above steps

Once you have completed these steps, go to Step 3