请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

Cannot read property 'NullLogger' of undefined

我使用ng new taskmgr3 --style=scss下载项目后,运行ng g m core报错Cannot read property 'NullLogger' of undefined,请老师帮帮忙,是怎么一回事,这个报错让我的学习停止在这个阶段了

https://img1.sycdn.imooc.com//szimg/5afea2770001666513500449.jpg

正在回答 回答被采纳积分+3

1回答

接灰的电子产品 2018-05-18 20:12:04

重新安装 CLI,

  1. 先卸载 npm uninstall -g @angular/cli

  2. 然后重新安装 cli,npm i -g @angular/cli@1.4.9

  3. 删除node_modules目录,重新 npm install

0 回复 有任何疑惑可以回复我~
  • 提问者 qq_灯芯_0 #1
    npm WARN @angular-devkit/schematics@0.0.52 requires a peer of @angular-devkit/co
    re@0.0.29 but none is installed. You must install peer dependencies yourself.
    npm WARN @schematics/angular@0.0.49 requires a peer of @angular-devkit/schematic
    s@0.0.34 but none is installed. You must install peer dependencies yourself.
    npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed.
     You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\@an
    gular\cli\node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
    1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
    )
    
    + @angular/cli@1.4.9
    added 978 packages in 91.523s
    
    C:\Users\Administrator>
    安装angular报这个错
    回复 有任何疑惑可以回复我~ 2018-05-19 10:34:45
  • 提问者 qq_灯芯_0 #2
    是不是还有哪里不太对啊
    回复 有任何疑惑可以回复我~ 2018-05-19 10:41:17
  • 提问者 qq_灯芯_0 #3
    是不是我把nodejs安装了d盘,而安装angular的时候默认在c盘找,因为我看用npm 安装angular的时候默认安装到C盘了
    回复 有任何疑惑可以回复我~ 2018-05-19 10:52:07
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信