Angular 4 - “tree.branch 不是一个函数"尝试开始一个新项目时 [英] Angular 4 - "tree.branch is not a function" when trying to start a new project

查看:23
本文介绍了Angular 4 - “tree.branch 不是一个函数"尝试开始一个新项目时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行 ng new testApp 时出现此错误

When I run ng new testApp I get this error

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

我的节点版本是6.11.4
我的 angular/cli 版本是 1.4.5
我的操作系统是 win32 x64

我正在尝试使 Angular 能够在我的工作 PC 上工作.

I'm trying to get angular to work on my work PC.

不知道我做错了什么.帮助

No idea what i'm doing wrong. Help

推荐答案

从 $HOME 目录中删除 node_modules 文件夹

Remove the node_modules folder from your $HOME directory

cd $HOME
rm -rf node_modules

由于某种原因,node_modules 文件夹位于 $HOME 目录中,并且 ng CLI 正在使用它.

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

这篇关于Angular 4 - “tree.branch 不是一个函数"尝试开始一个新项目时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆