npm install无法处理角度抛出错误

时间:2019-10-01 18:39:08

标签: angular npm

我有一个项目正在尝试执行npm我该项目不起作用,而对于其他民族来说,它在一个镜头之内就可以工作了...我已经检查了所有节点版本的角vesrions我不明白我所缺少的还是我的大腿设计支持?不知道请帮我 大家好,我一直在尝试解决这个问题,我几乎尝试了所有方法来解决,但无法..pLease帮助我。

第一次npm安装以下错误

npm install
npm WARN tarball tarball data for typescript@2.9.2 (sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==) seems to be corrupted. Trying one more time.
npm ERR! path C:\Desktop\Routing\noticeperiod-dev-frontend-master\noticeperiod-dev-frontend-master\node_modules\.staging\typescript-2f0799cb\lib\it\diagnosticMessages.generated.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\kishan babu\Desktop\Routing\noticeperiod-dev-frontend-master\noticeperiod-dev-frontend-master\node_modules\.staging\typescript-2f0799cb\lib\it\diagnosticMessages.generated.json'
npm ERR!  { [Error: EPERM: operation not permitted, unlink 'C:\Users\kishan babu\Desktop\Routing\noticeperiod-dev-frontend-master\noticeperiod-dev-frontend-master\node_modules\.staging\typescript-2f0799cb\lib\it\diagnosticMessages.generated.json']
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, unlink 'C:\Users\kishan babu\Desktop\Routing\noticeperiod-dev-frontend-master\noticeperiod-dev-frontend-master\node_modules\.staging\typescript-2f0799cb\lib\it\diagnosticMessages.generated.json'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'unlink',
npm ERR!      path:
npm ERR!       'C:\\Users\\Desktop\\Routing\\noticeperiod-dev-frontend-master\\noticeperiod-dev-frontend-master\\node_modules\\.staging\\typescript-2f0799cb\\lib\\it\\diagnosticMessages.generated.json' },
npm ERR!   stack:
npm ERR!    'Error: EPERM: operation not permitted, unlink \'C:\\Users\\Desktop\\Routing\\noticeperiod-dev-frontend-master\\noticeperiod-dev-frontend-master\\node_modules\\.staging\\typescript-2f0799cb\\lib\\it\\diagnosticMessages.generated.json\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path:
npm ERR!    'C:\\Users\\Desktop\\Routing\\noticeperiod-dev-frontend-master\\noticeperiod-dev-frontend-master\\node_modules\\.staging\\typescript-2f0799cb\\lib\\it\\diagnosticMessages.generated.json',
npm ERR!   parent: '@angular-devkit/build-optimizer' }
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 WARN registry Unexpected warning for http://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to http://registry.npmjs.org/json-schema-traverse failed, reason: connect ETIMEDOUT 104.16.19.35:80
npm WARN registry Using stale data from http://registry.npmjs.org/ due to a request error during revalidation.

有人面对这个问题吗?..............

4 个答案:

答案 0 :(得分:0)

一击即失败,只是一个接一个地安装您的依赖项

运行

npm i "typescript@2.9.2"npm i typescript

答案 1 :(得分:0)

错误:EPERM-表示权限不足。

请尝试修复它,因为NPM无法使用目标文件夹。

答案 2 :(得分:0)

请在执行npm时检查您的文件夹项目

请尝试使用其他驱动器

授予对该文件夹的所有访问权限。

答案 3 :(得分:0)

终端应以管理员身份打开, 它将完美运行