简体   繁体   English

Angular 安装:npm warn deprecated /module angular can not find

[英]Angular Installation: npm warn deprecated /module angular can not find

Could someone help me with this problem:有人可以帮我解决这个问题吗:

  1. i install "npm install -g @angular/cli" on my computer我在我的电脑上安装了“npm install -g @angular/cli”
  2. them i go to git to clone the documents to a repository called 'frontend'他们我去 git 将文档克隆到一个名为“前端”的存储库
  3. i open the CMD in the 'frontend' folder and try to run 'ng serve'(node have been already installed)我在“前端”文件夹中打开 CMD 并尝试运行“ng serve”(节点已安装)

And now in the cmd line:现在在 cmd 行中:

npm warn deprecated request@2.88.2: request has been deprecated.....etc
...
can not find module'@angular-devkit/build-angular/package.json'

How can i make this work?我怎样才能使这项工作?

PS, since i already installed:node/angular so i do not need to run 'npm install' inside folder before 'ng serve' is that right? PS,因为我已经安装了:node/angular 所以我不需要在 'ng serve' 之前在文件夹内运行 'npm install' 是吗?

Install @angular-devkit/build-angular as dev dependency.安装 @angular-devkit/build-angular 作为开发依赖项。 This package is newly introduced in Angular 6.0这个包是在 Angular 6.0 中新引入的

npm install --save-dev @angular-devkit/build-angular npm install --save-dev @angular-devkit/build-angular

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM