Skip to content

[Angular 5] Error: Cannot find module '@angular-devkit/core' #62

@alanhe421

Description

@alanhe421

Angular5项目执行ng serve报以下错误,

Cannot find module '@angular-devkit/core' 

查看官方cli库,发现@angular/cli 1.5依赖了devkit
image
升级cli到1.6.8,再次执行serve解决
image

比如玩Express.js等框架有时也会报这种错误,一部分都是依赖问题,但背后就是这些框架的版本问题,单单看到缺少某个模块就install,会发现安了A,又报缺少B。总是解决不完,这是因为在NPM这个设计下,一个模块有时依赖了N个模块。所以考虑直接升级这个模块,利用其依赖关系安装所有模块可以高效解决问题。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions