Angular cli npm WARN tar EPERM:不允许操作,打开

Angular cli npm WARN tar EPERM:不允许操作,打开,angular-cli,angular6,Angular Cli,Angular6,议程:使用cli创建新的角度项目 配置: 操作系统:Windows10 64位 npm-v:6.4.1 节点-v:9.11.1 最新版本 观察到以下命令的行为: c:\AngularDemo>ng new guessthenumber --inlineTemplate ? Would you like to add Angular routing? Yes ? Which stylesheet format would you like to use? CSS CREATE guessth

议程:使用cli创建新的角度项目

配置: 操作系统:Windows10 64位 npm-v:6.4.1 节点-v:9.11.1 最新版本

观察到以下命令的行为:

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.
c:\AngularDemo>ng新猜测编号--inlineTemplate
? 是否要添加角度布线?对
? 您希望使用哪种样式表格式?CSS
创建猜测编号/angular.json(3933字节)
创建猜测编号/package.json(1321字节)
创建猜测编号/README.md(1031字节)
创建猜测编号/tsconfig.json(408字节)
创建猜测编号/tslint.json(2837字节)
创建猜测编号/.editorconfig(245字节)
创建guessthenumber/.gitignore(503字节)
创建猜测编号/src/favicon.ico(5430字节)
创建猜测编号/src/index.html(301字节)
创建猜测编号/src/main.ts(372字节)
创建猜测编号/src/polyfills.ts(3234字节)
创建猜测编号/src/test.ts(642字节)
创建猜测编号/src/styles.css(80字节)
创建猜测编号/src/browserslist(388字节)
创建猜测编号/src/karma.conf.js(964字节)
创建猜测编号/src/tsconfig.app.json(166字节)
创建猜测编号/src/tsconfig.spec.json(256字节)
创建猜测编号/src/tslint.json(314字节)
创建猜测编号/src/assets/.gitkeep(0字节)
创建猜测编号/src/environments/environment.prod.ts(51字节)
创建猜测编号/src/environments/environment.ts(662字节)
创建猜测编号/src/app/app-routing.module.ts(245字节)
创建猜测编号/src/app/app.module.ts(393字节)
创建猜测编号/src/app/app.component.spec.ts(1119字节)
创建猜测编号/src/app/app.component.ts(1429字节)
创建猜测编号/src/app/app.component.css(0字节)
创建猜测编号/e2e/pregrator.conf.js(752字节)
创建猜测编号/e2e/tsconfig.e2e.json(213字节)
创建猜测编号/e2e/src/app.e2e-spec.ts(310字节)
创建猜测编号/e2e/src/app.po.ts(208字节)
npm警告不推荐的循环-json@0.5.9:CircularJSON仅在维护中,flatted是其继任者。
npm WARN tar EPERM:不允许操作,打开'c:\AngularDemo\guessthenumber\node\U modules\.staging\@angular\core-483ac45b\esm2015\src\render3\instructions.js'
npm错误!我从没打过电话!
npm错误!这是npm本身的一个错误。请通过以下地址报告此错误:
npm错误!
npm错误!此运行的完整日志可在以下位置找到:
npm错误!C:\Users\params\AppData\Roaming\npm cache\\ u logs\2018-10-31T11\u 07\u 38\u 873Z-debug.log
软件包安装失败,请参阅上文。
预期行为:它应该已经创建了没有任何错误的项目

我尝试过的:

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缓存清理--强制-->不起作用

禁用的防病毒-->不起作用


使用administrator-->运行cmd无效

请尝试使用类似Visual studio的IDE创建角度项目


我在使用“推荐提示符”创建项目时遇到了同样的问题。然后我在visual studio中尝试了同样的方法,我可以毫无问题地创建项目。

我在这里做得很晚,但我遇到了同样的问题,下面列出了帮助我解决问题的方法:

  • 关闭IDE
  • 确保您没有在单独的控制台中运行ng server
  • 右键单击有问题的文件,然后取消选中“只读”标志

有些时候,所有问题都取决于您的防病毒软件,在设置中打开您的防病毒软件,您将看到node.js或其他软件被阻止的位置,在允许后,它将正常工作

我也面临同样的问题。有人能帮我吗?我试过使用visual code,但也出现了同样的错误。我使用的是visual Studio 1.28.2版。您正在使用哪个版本?-----版本:1.28.2(用户设置)提交:7f3ce96ff4729c91352ae6def877e59c561f4850日期:2018-10-17T00:23:51.859Z电子:2.0.9 Chrome:61.0.3163.100 Node.js:8.9.3 V8:6.1.534.41体系结构:x64版本:1.28.2(系统设置)提交:7f3ce96ff4729c91352ae6def877e59c561f4850日期:2018-10-17T00:23:51.859Z电子:2.0.9 Chrome:61.0.3163.100 Node.js:8.9.3 V8:6.1.534.41体系结构:x64OP在他们的问题中说,禁用他们的防病毒软件不起作用。