Just installed Node 9.5.0 and ran the ng new hello command. It finished with the following error:
error: could not expand include path '~/.gitcinclude'
fatal: bad config line 49 in file /usr/local/git/etc/gitconfig
Project 'hello' successfully created.
I use CLI 1.7.0, and tried using both npm and yarn as a global package manager - the same error.
After deleting node_modules in the newly generated project, both npm i and yarn install successfully complete.
Also, when using ng new hello --skip-git, the project generation completes without errors.
Expected behavior:
The ng new hello should complete without errors
@yfain I have the same environment but all works properly.
```
Angular CLI: 1.7.0
Node: 9.5.0
OS: darwin x64
Angular: 5.2.5
I faced the same issue like @yfain
I had to follow the steps suggested in https://stackoverflow.com/questions/36908041/git-could-not-expand-include-path-gitcinclude-fatal-bad-config-file-line
I did the changes to the gitconfig file located at /usr/local/git/etc/gitconfig
Under the [core] heading :
excludesfile = ~/.gitignore
change to....
excludesfile = /Users/<my username>/.gitignore
and under [include] heading :
path = ~/.gitcinclude
change to...
path = /Users/<my username>/.gitcinclude
That did the trick
thanks
Ram
@yfain do you still hit this issue?
@mgechev I don't use these versions of Node and CLI any longer. With the latest versions, I have no errors.
@yfain thanks for the quick response
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
I faced the same issue like @yfain
I had to follow the steps suggested in https://stackoverflow.com/questions/36908041/git-could-not-expand-include-path-gitcinclude-fatal-bad-config-file-line
I did the changes to the gitconfig file located at /usr/local/git/etc/gitconfig
That did the trick
thanks
Ram