npm WARN checkPermissions Missing write access to C:\Users\zhang\AppData\Roaming\npm\node_modules\@a

本文介绍了在全局安装Angular CLI时遇到的权限错误,并提供了解决方案,包括删除原有node_modules文件夹及重新安装的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

npm WARN checkPermissions Missing write access to C:\Users\zhang\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\camelcase
npm WARN checkPermissions Missing write access to C:\Users\zhang\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\kind-of
npm WARN checkPermissions Missing write access to C:\Users\zhang\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\fsevents
npm WARN checkPermissions Missing write access to C:\Users\zhang\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\source-map
npm ERR! path C:\Users\zhang\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\camelcase
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access 'C:\Users\zhang\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\camelcase'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\zhang\AppData\Roaming\npm-cache\_logs\2018-09-03T06_37_14_187Z-debug.log

===================================================================================

以上错误是重新全局安装angular-cli的时候出现的:
npm uninstall -g @angular/cli
npm cache verify
npm install -g @angular/cli@6.1.5 -save-dev

 

解决方法:

1)删除原有的node_modules文件夹,即C:\Users\zhang\AppData\Roaming\npm\node_modules

2)重新执行安装命令:npm install -g @angular/cli@6.1.5 -save-dev

D:\vueTest\hello_vue3>npm install vue@3 vue-router@4 vuex@4 npm warn ERESOLVE overriding peer dependency npm warn While resolving: hello_vue3@0.0.0 npm warn Found: vue@3.5.13 npm warn node_modules/vue npm warn peer vue@"^3.2.25" from @vitejs/plugin-vue@5.2.1 npm warn node_modules/@vitejs/plugin-vue npm warn dev @vitejs/plugin-vue@"^5.2.1" from the root project npm warn 4 more (@vue/devtools-core, @vue/server-renderer, ...) npm warn npm warn Could not resolve dependency: npm warn peer vue@"^3.2.25" from @vitejs/plugin-vue@5.2.1 npm warn node_modules/@vitejs/plugin-vue npm warn dev @vitejs/plugin-vue@"^5.2.1" from the root project npm warn ERESOLVE overriding peer dependency npm warn While resolving: hello_vue3@0.0.0 npm warn Found: vue@3.5.13 npm warn node_modules/vue npm warn peer vue@"^3.2.25" from @vitejs/plugin-vue@5.2.1 npm warn node_modules/@vitejs/plugin-vue npm warn dev @vitejs/plugin-vue@"^5.2.1" from the root project npm warn 4 more (@vue/devtools-core, @vue/server-renderer, ...) npm warn npm warn Could not resolve dependency: npm warn peerOptional vue@"^3.4.0" from @vue/tsconfig@0.7.0 npm warn node_modules/@vue/tsconfig npm warn dev @vue/tsconfig@"^0.7.0" from the root project npm error code EPERM npm error syscall open npm error path D:\NodeJs\node_cache\_cacache\tmp\d26cdece npm error errno EPERM npm error FetchError: Invalid response body while trying to fetch https://registry.npmmirror.com/vue: EPERM: operation not permitted, open 'D:\NodeJs\node_cache\_cacache\tmp\d26cdece' npm error at D:\NodeJs\node_modules\npm\node_modules\minipass-fetch\lib\body.js:170:15 npm error at async Response.json (D:\NodeJs\node_modules\npm\node_modules\minipass-fetch\lib\body.js:75:17) npm error at async RegistryFetcher.packument (D:\NodeJs\node_modules\npm\node_modules\pacote\lib\registry.js:98:25) npm error at async RegistryFetcher.manifest (D:\NodeJs\node_modules\npm\node_modules\pacote\lib\registry.js:128:23) npm error at async #fetchManifest (D:\NodeJs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1202:20) npm error at async #nodeFromEdge (D:\NodeJs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1040:19) npm error at async #buildDepStep (D:\NodeJs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:904:11) npm error at async Arborist.buildIdealTree (D:\NodeJs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:181:7) npm error at async Promise.all (index 1) npm error at async Arborist.reify (D:\NodeJs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:131:5) { npm error code: 'EPERM', npm error errno: 'EPERM', npm error syscall: 'open', npm error path: 'D:\\NodeJs\\node_cache\\_cacache\\tmp\\d26cdece', npm error type: 'system', npm error requiredBy: '.' npm error } npm error npm error The operation was rejected by your operating system. npm error It's possible that the file was already in use (by a text editor or antivirus), npm error or that you lack permissions to access it. npm error npm error If you believe this might be a permissions issue, please double-check the npm error permissions of the file and its containing directories, or try running npm error the command again as root/Administrator. npm error Log files were not written due to an error writing to the directory: D:\NodeJs\node_cache\_logs npm error You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
03-08
PS D:\BaiduNetdiskDownload\医院管理系统01\医院管理系统01\前端文件\HospitalManagerVue> npm i npm WARN cleanup Failed to remove some directories [ npm WARN cleanup [ npm WARN cleanup 'D:\\BaiduNetdiskDownload\\医院管理系统01\\医院管理系统01\\前端文件\\HospitalManagerVue\\node_modules\\@vue\\cli-service\\node_modules\\loader-utils', npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'D:\BaiduNetdiskDownload\医院管理系统01\医院管理系统01\前端文件\HospitalManagerVue\node_modules\@vue\cli-service\node_modules\loader-utils'] { npm WARN cleanup errno: -4048, npm WARN cleanup code: 'EPERM', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'D:\\BaiduNetdiskDownload\\医院管理系统01\\医院管理系统01\\前端文件\\HospitalManagerVue\\node_modules\\@vue\\cli-service\\node_modules\\loader-utils' npm WARN cleanup } npm WARN cleanup ], npm WARN cleanup [ npm WARN cleanup 'D:\\BaiduNetdiskDownload\\医院管理系统01\\医院管理系统01\\前端文件\\HospitalManagerVue\\node_modules\\sass-loader', npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'D:\BaiduNetdiskDownload\医院管理系统01\医院管理系统01\前端文件\HospitalManagerVue\node_modules\sass-loader\node_modules\loader-utils'] { npm WARN cleanup errno: -4048, npm WARN cleanup code: 'EPERM', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'D:\\BaiduNetdiskDownload\\医院管理系统01\\医院管理系统01\\前端文件\\HospitalManagerVue\\node_modules\\sass-loader\\node_modules\\loader-utils' npm WARN cleanup } npm WARN cleanup ], npm WARN cleanup [ npm WARN cleanup 'D:\\BaiduNetdiskDownload\\医院管理系统01\\医院管理系统01\\前端文件\\HospitalManagerVue\\node_modules\\@vue', npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'D:\BaiduNetdiskDownload\医院管理系统01\医院管理系统01\前端文件\HospitalManagerVue\node_modules\@vue\cli-service\node_modules\chalk'] { npm WARN cleanup errno: -4048, npm WARN cleanup code: 'EPERM', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'D:\\BaiduNetdiskDownload\\医院管理系统01\\医院管理系统01\\
03-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值