Angular 4 - “tree.branch is not a function” when trying to start a new project

前端 未结 2 1871
旧巷少年郎
旧巷少年郎 2021-02-11 07:13

When I run ng new testApp I get this error

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

My node version is

2条回答
  •  花落未央
    2021-02-11 07:59

    Remove the node_modules folder from your $HOME directory

    cd $HOME
    rm -rf node_modules
    

    For some reason the node_modules folder was in the $HOME directory and ng CLI was using it.

提交回复
热议问题