Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/31.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
angular cli未更新,ng serve不工作_Angular_Npm_Angular Cli_Npm Install - Fatal编程技术网

angular cli未更新,ng serve不工作

angular cli未更新,ng serve不工作,angular,npm,angular-cli,npm-install,Angular,Npm,Angular Cli,Npm Install,我想更新我的angular cli。我正在使用: npm安装-g@angular/cli 但我发现了以下错误: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported n

我想更新我的angular cli。我正在使用:

npm安装-g@angular/cli

但我发现了以下错误:

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm ERR! path C:\Users\Saeed\AppData\Roaming\npm\ng
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall open
npm ERR! Error: EPERM: operation not permitted, open 'C:\Users\Saeed\AppData\Roaming\npm\ng'
npm ERR!  { [Error: EPERM: operation not permitted, open 'C:\Users\Saeed\AppData\Roaming\npm\ng']
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, open 'C:\Users\Saeed\AppData\Roaming\npm\ng'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'open',
npm ERR!      path: 'C:\\Users\\Saeed\\AppData\\Roaming\\npm\\ng' },
npm ERR!   stack:
npm ERR!    'Error: EPERM: operation not permitted, open \'C:\\Users\\Saeed\\AppData\\Roaming\\npm\\ng\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path: 'C:\\Users\\Saeed\\AppData\\Roaming\\npm\\ng' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Saeed\AppData\Roaming\npm-cache\_logs\2020-10-07T07_21_17_386Z-debug.log
然后,当我想运行
ng serve
时,我会得到以下错误:

bash:/c/Users/Saeed/AppData/Roaming/npm/ng:权限被拒绝

我该怎么办?有什么帮助吗


我还删除了npm缓存,但没关系。

你有运行angular应用程序吗?尝试重新启动系统并再次运行命令。 文件可能被正在运行的应用程序锁定,从而导致上述错误