question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

In Node 9.5.0, generating new project reports an error

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
ramki982commented, Feb 22, 2018

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

1reaction
rafa-ascommented, Feb 19, 2018

@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
Read more comments on GitHub >

github_iconTop Results From Across the Web

I get an error when trying to install strapi - Stack Overflow
When trying to install strapi with npx create-strapi-app@latest my-project. , an error appears. Everything used to work fine, now it doesn't ...
Read more >
Job can run successful without executing all script commands ...
Create a simple Node.js project with a failing example test (I used mocha). In package.json add test script so it can be called...
Read more >
standard-version - npm
A utility for versioning using semver and CHANGELOG generation powered by Conventional Commits. ci NPM version codecov Conventional Commits ...
Read more >
drupal 10.0.0 | Drupal.org
Install. To start a new Drupal project with version 10.0.0: composer create-project drupal/recommended-project:10.0.0 ...
Read more >
Changelog - hapi.dev
Future-proof hapi for node v16, rely on res close rather than req ... Replace new Buffer() ... Auth entity error reports the wrong...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found