angular问题解决:“”You seem to not be depending on “@angular/core”. This is an error“”

前言:

继上一篇博客,angular/cli安装成功之后,重新启动服务 ng serve ,然后就报错了,上面意思是说没有依赖于“@ angular / core”。 这是一个错误。

内容:

1、问题一:

You seem to not be depending on “@angular/core”. This is an error

(1)、删除node_modules,再重新安装

rimraf node_modules
cnpm install

(2)、使用npm安装

如果cnpm安装不成功,使用npm install

2、问题二:node_modules appears empty, you may need to run `npm install`

这句话的意思是:node_modules是空的,需要npm install(npm 安装)

进入你的项目,然后重新安装

cd 项目
npm install 或 npm i

猜你喜欢

转载自blog.csdn.net/tgbyn/article/details/80362062
今日推荐