议程:使用cli创建新的角度项目
配置: 操作系统:Windows10 64bit npm -v:6.4.1 节点-v:9.11.1 角度cli:最新
以下命令上观察到的行为:
c:\AngularDemo>ng new guessthenumber --inlineTemplate
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? CSS
CREATE guessthenumber/angular.json (3933 bytes)
CREATE guessthenumber/package.json (1321 bytes)
CREATE guessthenumber/README.md (1031 bytes)
CREATE guessthenumber/tsconfig.json (408 bytes)
CREATE guessthenumber/tslint.json (2837 bytes)
CREATE guessthenumber/.editorconfig (245 bytes)
CREATE guessthenumber/.gitignore (503 bytes)
CREATE guessthenumber/src/favicon.ico (5430 bytes)
CREATE guessthenumber/src/index.html (301 bytes)
CREATE guessthenumber/src/main.ts (372 bytes)
CREATE guessthenumber/src/polyfills.ts (3234 bytes)
CREATE guessthenumber/src/test.ts (642 bytes)
CREATE guessthenumber/src/styles.css (80 bytes)
CREATE guessthenumber/src/browserslist (388 bytes)
CREATE guessthenumber/src/karma.conf.js (964 bytes)
CREATE guessthenumber/src/tsconfig.app.json (166 bytes)
CREATE guessthenumber/src/tsconfig.spec.json (256 bytes)
CREATE guessthenumber/src/tslint.json (314 bytes)
CREATE guessthenumber/src/assets/.gitkeep (0 bytes)
CREATE guessthenumber/src/environments/environment.prod.ts (51 bytes)
CREATE guessthenumber/src/environments/environment.ts (662 bytes)
CREATE guessthenumber/src/app/app-routing.module.ts (245 bytes)
CREATE guessthenumber/src/app/app.module.ts (393 bytes)
CREATE guessthenumber/src/app/app.component.spec.ts (1119 bytes)
CREATE guessthenumber/src/app/app.component.ts (1429 bytes)
CREATE guessthenumber/src/app/app.component.css (0 bytes)
CREATE guessthenumber/e2e/protractor.conf.js (752 bytes)
CREATE guessthenumber/e2e/tsconfig.e2e.json (213 bytes)
CREATE guessthenumber/e2e/src/app.e2e-spec.ts (310 bytes)
CREATE guessthenumber/e2e/src/app.po.ts (208 bytes)
npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm WARN tar EPERM: operation not permitted, open 'c:\AngularDemo\guessthenumber\node_modules\.staging\@angular\core-483ac45b\esm2015\src\render3\instructions.js'
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\params\AppData\Roaming\npm-cache\_logs\2018-10-31T11_07_38_873Z-debug.log
Package install failed, see above.
预期的行为:它应该已经创建了项目,而没有任何错误
我尝试过的事情:
npm缓存清理--force->无效
已禁用防病毒软件->无效
使用管理员运行cmd->无效
答案 0 :(得分:0)
请尝试使用像Visual Studio这样的IDE创建角度项目。
我遇到了同样的问题,当我使用命令提示符创建项目时,然后我在Visual Studio中尝试了同样的操作,便可以毫无问题地创建。
答案 1 :(得分:0)
我来这里很晚,但是我遇到了同样的问题,这是一些帮助我解决问题的东西: