Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 从cli生成新角度应用程序引发npm错误_Node.js_Angular - Fatal编程技术网

Node.js 从cli生成新角度应用程序引发npm错误

Node.js 从cli生成新角度应用程序引发npm错误,node.js,angular,Node.js,Angular,我对英语不是很熟悉。我正在从CLI生成一个新的Angular应用程序,但我收到了npm错误 ubox18@ubox18:~/ng-apps$ ng new techadda ? Would you like to add Angular routing? Yes ? Which stylesheet format would you like to use? CSS CREATE techadda/README.md (1025 bytes) CREATE techadda/.editorcon

我对英语不是很熟悉。我正在从CLI生成一个新的Angular应用程序,但我收到了npm错误

ubox18@ubox18:~/ng-apps$ ng new techadda
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? CSS
CREATE techadda/README.md (1025 bytes)
CREATE techadda/.editorconfig (246 bytes)
CREATE techadda/.gitignore (629 bytes)
CREATE techadda/angular.json (3825 bytes)
CREATE techadda/package.json (1307 bytes)
CREATE techadda/tsconfig.json (435 bytes)
CREATE techadda/tslint.json (1621 bytes)
CREATE techadda/src/favicon.ico (5430 bytes)
CREATE techadda/src/index.html (295 bytes)
CREATE techadda/src/main.ts (372 bytes)
CREATE techadda/src/polyfills.ts (2841 bytes)
CREATE techadda/src/styles.css (80 bytes)
CREATE techadda/src/test.ts (642 bytes)
CREATE techadda/src/browserslist (388 bytes)
CREATE techadda/src/karma.conf.js (1021 bytes)
CREATE techadda/src/tsconfig.app.json (166 bytes)
CREATE techadda/src/tsconfig.spec.json (256 bytes)
CREATE techadda/src/tslint.json (244 bytes)
CREATE techadda/src/assets/.gitkeep (0 bytes)
CREATE techadda/src/environments/environment.prod.ts (51 bytes)
CREATE techadda/src/environments/environment.ts (662 bytes)
CREATE techadda/src/app/app-routing.module.ts (245 bytes)
CREATE techadda/src/app/app.module.ts (393 bytes)
CREATE techadda/src/app/app.component.css (0 bytes)
CREATE techadda/src/app/app.component.html (1152 bytes)
CREATE techadda/src/app/app.component.spec.ts (1101 bytes)
CREATE techadda/src/app/app.component.ts (212 bytes)
CREATE techadda/e2e/protractor.conf.js (752 bytes)
CREATE techadda/e2e/tsconfig.e2e.json (213 bytes)
CREATE techadda/e2e/src/app.e2e-spec.ts (637 bytes)
CREATE techadda/e2e/src/app.po.ts (251 bytes)
Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/713bc9a4'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/587a6d34'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/d24ecd3c'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/183be234'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/65378392'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/c2e18bc1'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/19e9a26f'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/14846b9a'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/1d1b4940'

Unhandled rejection Error: EACCES: permission denied, open '/home/ubox18/.npm/_cacache/tmp/fb3fc3bb'

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>
Package install failed, see above.
ubox18@ubox18:~/ng应用程序$ng新techadda
? 是否要添加角度布线?对
? 您希望使用哪种样式表格式?CSS
创建techadda/README.md(1025字节)
创建techadda/.editorconfig(246字节)
创建techadda/.gitignore(629字节)
创建techadda/angular.json(3825字节)
创建techadda/package.json(1307字节)
创建techadda/tsconfig.json(435字节)
创建techadda/tslint.json(1621字节)
创建techadda/src/favicon.ico(5430字节)
创建techadda/src/index.html(295字节)
创建techadda/src/main.ts(372字节)
创建techadda/src/polyfills.ts(2841字节)
创建techadda/src/styles.css(80字节)
创建techadda/src/test.ts(642字节)
创建techadda/src/browserslist(388字节)
创建techadda/src/karma.conf.js(1021字节)
创建techadda/src/tsconfig.app.json(166字节)
创建techadda/src/tsconfig.spec.json(256字节)
创建techadda/src/tslint.json(244字节)
创建techadda/src/assets/.gitkeep(0字节)
创建techadda/src/environments/environment.prod.ts(51字节)
创建techadda/src/environments/environment.ts(662字节)
创建techadda/src/app/app-routing.module.ts(245字节)
创建techadda/src/app/app.module.ts(393字节)
创建techadda/src/app/app.component.css(0字节)
创建techadda/src/app/app.component.html(1152字节)
创建techadda/src/app/app.component.spec.ts(1101字节)
创建techadda/src/app/app.component.ts(212字节)
创建techadda/e2e/dragrator.conf.js(752字节)
创建techadda/e2e/tsconfig.e2e.json(213字节)
创建techadda/e2e/src/app.e2e-spec.ts(637字节)
创建techadda/e2e/src/app.po.ts(251字节)
未处理的拒绝错误:EACCES:权限被拒绝,打开“/home/ubox18/.npm/\u cache/tmp/713bc9a4”
未处理的拒绝错误:EACCES:权限被拒绝,打开“/home/ubox18/.npm/_cache/tmp/587a6d34”
未处理的拒绝错误:EACCES:权限被拒绝,打开“/home/ubox18/.npm/_cache/tmp/d24ecd3c”
未处理的拒绝错误:EACCES:权限被拒绝,打开“/home/ubox18/.npm/\u cacache/tmp/183be234”
未处理的拒绝错误:EACCES:权限被拒绝,打开“/home/ubox18/.npm/_cacache/tmp/65378392”
未处理的拒绝错误:EACCES:权限被拒绝,打开“/home/ubox18/.npm/_cache/tmp/c2e18bc1”
未处理的拒绝错误:EACCES:权限被拒绝,打开“/home/ubox18/.npm/\u cacache/tmp/19e9a26f”
未处理的拒绝错误:EACCES:权限被拒绝,打开“/home/ubox18/.npm/\u cacache/tmp/14846b9a”
未处理的拒绝错误:EACCES:权限被拒绝,打开“/home/ubox18/.npm/_cache/tmp/1d1b4940”
未处理的拒绝错误:EACCES:权限被拒绝,打开“/home/ubox18/.npm/\u cache/tmp/fb3fc3bb”
npm错误!我从没打过电话!
npm错误!这是npm本身的一个错误。请通过以下地址报告此错误:
npm错误!
软件包安装失败,请参阅上文。

任何人都可以帮助解决这个错误。我搜索并仔细阅读了这个答案:但这不起作用

像这样给予npm所有权:

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
或尝试

sudo chown -R $(whoami) ~/.npm

你能试着像这样给予npm所有权吗

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config

您的计算机中似乎存在管理员权限问题,请尝试从nodejs cmd而不是普通cmd运行相同的权限,或者提供必要的权限如果您使用的是Linux或Mac,请使用sudo;如果您使用的是windows,请以管理员身份运行,然后运行命令。