Angular,创建新项目失败 [英] Angular , creating new project fail

查看:55
本文介绍了Angular,创建新项目失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Angular的新手.通过Cls成功安装了Angular,但是当我通过键入"ng new projectName"创建项目时.它失败.给我这个

I am new to Angular. Successfully installed Angular by Cls, but when i create project by typing "ng new projectName". It fails. gives me this

$ ng new p1
CREATE p1/angular.json (3512 bytes)
CREATE p1/package.json (1306 bytes)
CREATE p1/README.md (1019 bytes)
CREATE p1/tsconfig.json (384 bytes)
CREATE p1/tslint.json (2805 bytes)
CREATE p1/.editorconfig (245 bytes)
CREATE p1/.gitignore (503 bytes)
CREATE p1/src/environments/environment.prod.ts (51 bytes)
CREATE p1/src/environments/environment.ts (631 bytes)
CREATE p1/src/favicon.ico (5430 bytes)
CREATE p1/src/index.html (289 bytes)
CREATE p1/src/main.ts (370 bytes)
CREATE p1/src/polyfills.ts (3194 bytes)
CREATE p1/src/test.ts (642 bytes)
CREATE p1/src/assets/.gitkeep (0 bytes)
CREATE p1/src/styles.css (80 bytes)
CREATE p1/src/browserslist (375 bytes)
CREATE p1/src/karma.conf.js (964 bytes)
CREATE p1/src/tsconfig.app.json (194 bytes)
CREATE p1/src/tsconfig.spec.json (282 bytes)
CREATE p1/src/tslint.json (314 bytes)
CREATE p1/src/app/app.module.ts (314 bytes)
CREATE p1/src/app/app.component.html (1141 bytes)
CREATE p1/src/app/app.component.spec.ts (985 bytes)
CREATE p1/src/app/app.component.ts (207 bytes)
CREATE p1/src/app/app.component.css (0 bytes)
CREATE p1/e2e/protractor.conf.js (752 bytes)
CREATE p1/e2e/src/app.e2e-spec.ts (298 bytes)
CREATE p1/e2e/src/app.po.ts (208 bytes)
CREATE p1/e2e/tsconfig.e2e.json (213 bytes)
...

npm WARN不推荐使用的istanbul-lib-hook@1.2.1:1.2.0应该是主要版本
离子凸点

npm WARN deprecated istanbul-lib-hook@1.2.1: 1.2.0 should have been a major vers
ion bump

我已经尝试过 npm cache clear --force .问题仍然存在

I have tried npm cache clear --force. Still problem persist

然后当我键入"ng serve"时,它不起作用,它给了我-

and then when i type "ng serve", it does not work it gives me -

无法从"C:\ Users \ Avvncor \ Projects \ p1"找到模块"@ angular-devkit/build-angular".错误:无法从"C:\ Users \ Avvncor \ Projects \ p1"中找到模块"@ angular-devkit/build-angular".C:\ Users \ Avvncor \ Projects \ p1."

"Could not find module "@angular-devkit/build-angular" from "C:\Users\Avvncor\Projects\p1". Error: Could not find module "@angular-devkit/build-angular" from "C:\Users\Avvncor\Projects\p1". "

推荐答案

那不是错误,它们是在新项目中创建的文件.您应该不会有任何问题,如果有的话请发表评论.希望这可以帮助!

That is not an error, those are the files created in a new project. You shouldn't have any problems, comment if you do. Hope this helps!

这篇关于Angular,创建新项目失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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