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.

Cannot initialize a new project after installing angular/cli 1.4.7 - Error: tree.branch is not a function

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [ x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.4.7 node: 8.6.0 os: linux x64

Repro steps.

  • Installed Ubuntu GNOME 16.04
  • Installed npm, node, angular/cli
  • Tried to create a new angular project

The log given by the failure.

Error: tree.branch is not a function tree.branch is not a function

Desired functionality.

To create a new angular project

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:18 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
yeshesvicommented, Oct 29, 2017

Doing this worked for me. Thanks to @dharders

i.e.

find ./node_modules -type d | grep "/rxjs$"

./node_modules/@angular/cli/node_modules/rxjs
./node_modules/@angular/core/node_modules/rxjs
./node_modules/@angular/http/node_modules/rxjs
./node_modules/@angular/router/node_modules/rxjs
./node_modules/rxjs

Then after manual deletion of sub-directories:

find ./node_modules -type d | grep "/rxjs$"

./node_modules/rxjs

Then ng new works without any problems.

1reaction
Callie-C-Wangcommented, Nov 8, 2017

@yeshesvi Thanks for your example, your solution works for me. I delete duplicated rxjs folders and files. Then issue is solved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

unable to resolve dependency tree error for creating new ...
Open the folder you create with ng new and open the package.json file. In devDependencies change the version of "jasmine-core" 3.6.0 to ...
Read more >
New Section - Angular Components and Core Directives
I'm getting the following. ERROR in ./src/polyfills.ts. Module not found: Error: Can't resolve '@angular/localize/init'.
Read more >
npm err eresolve could not resolve angular - You.com
It means you have dependency conflicts. So try running the following options one by one. Remove node_modules and package-lock.json and then run. npm...
Read more >
Creating libraries - Angular
This page provides a conceptual overview of how to create and publish new libraries to extend Angular functionality. If you find that you...
Read more >
Bug listing with status UNCONFIRMED as at 2022/12/24 17 ...
temp//ccEGYzBU.ltrans0.ltrans.o:ccEGYzBU.ltrans0.o:function ... error: cannot run test program while cross compiling" status:UNCONFIRMED resolution: ...
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