webstorm忽略node_modules目录

本文介绍如何在 WebStorm 中设置忽略 node_modules 目录,以提高代码编辑效率及项目加载速度。通过简单配置,可以避免 IDE 对该目录进行不必要的索引,减少资源消耗。

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

PS D:\前端\苍穹外卖\前端源码\苍穹外卖前端源码\project-sky-admin-vue-ts> npm install -g cnpm --registry=https://registry.npmmirror.com npm ERR! code EPERM npm ERR! syscall rename npm ERR! path D:\My Software\nvm\nvm\v14.20.1\node_modules\cnpm\node_modules\.make-fetch-happen.DELETE\node_modules\@npmcli npm ERR! dest D:\My Software\nvm\nvm\v14.20.1\node_modules\cnpm\node_modules\make-fetch-happen\node_modules\@npmcli npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, rename 'D:\My Software\nvm\nvm\v14.20.1\node_modules\cnpm\node_modules\.make-fetch-happen.DELETE\node_modules\@npmcli' -> 'D:\My Software\nvm\nvm\v14.20.1\node_modules\cnpm\node_modules\make-fetch-happen\node_modules\@npmcli' npm ERR! [OperationalError: EPERM: operation not permitted, rename 'D:\My Software\nvm\nvm\v14.20.1\node_modules\cnpm\node_modules\.make-fetch-happen.DELETE\node_modules\@npmcli' -> 'D:\My Software\nvm\nvm\v14.20.1\node_modules\cnpm\node_modules\make-fetch-happen\node_modules\@npmcli'] { npm ERR! cause: [Error: EPERM: operation not permitted, rename 'D:\My Software\nvm\nvm\v14.20.1\node_modules\cnpm\node_modules\.make-fetch-happen.DELETE\node_modules\@npmcli' -> 'D:\My Software\nvm\nvm\v14.20.1\node_modules\cnpm\node_modules\make-fetch-happen\node_modules\@npmcli'] { npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'rename', npm ERR! path: 'D:\\My Software\\nvm\\nvm\\v14.20.1\\node_modules\\cnpm\\node_modules\\.make-fetch-happen.DELETE\\node_modules\\@npmcli', npm ERR! dest: 'D:\\My Software\\nvm\\nvm\\v14.20.1\\node_modules\\cnpm\\node_modules\\make-fetch-happen\\node_modules\\@npmcli' npm ERR! }, npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'rename', npm ERR! path: 'D:\\My Software\\nvm\\nvm\\v14.20.1\\node_modules\\cnpm\\node_modules\\.make-fetch-happen.DELETE\\node_modules\\@npmcli', npm ERR! dest: 'D:\\My Software\\nvm\\nvm\\v14.20.1\\node_modules\\cnpm\\node_modules\\make-fetch-happen\\node_modules\\@npmcli', npm ERR! parent: 'cnpm' npm ERR! } 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. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\liuchaokun\AppData\Roaming\npm-cache\_logs\2025-07-29T10_46_19_208Z-debug.log
最新发布
07-30
npm error code EPERM npm error syscall mkdir npm error path E:\网页\Node\node_cache\_cacache npm error errno EPERM npm error FetchError: Invalid response body while trying to fetch https://registry.npmmirror.com/cnpm: EPERM: operation not permitted, mkdir 'E:\网页\Node\node_cache\_cacache' npm error at E:\网页\Node\node_modules\npm\node_modules\minipass-fetch\lib\body.js:170:15 npm error at async Response.json (E:\网页\Node\node_modules\npm\node_modules\minipass-fetch\lib\body.js:75:17) npm error at async RegistryFetcher.packument (E:\网页\Node\node_modules\npm\node_modules\pacote\lib\registry.js:98:25) npm error at async RegistryFetcher.manifest (E:\网页\Node\node_modules\npm\node_modules\pacote\lib\registry.js:128:23) npm error at async #fetchManifest (E:\网页\Node\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1202:20) npm error at async #nodeFromEdge (E:\网页\Node\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1040:19) npm error at async #buildDepStep (E:\网页\Node\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:904:11) npm error at async Arborist.buildIdealTree (E:\网页\Node\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:181:7) npm error at async Arborist.reify (E:\网页\Node\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:131:5) npm error at async Install.exec (E:\网页\Node\node_modules\npm\lib\commands\install.js:150:5) { npm error code: 'EPERM', npm error errno: 'EPERM', npm error syscall: 'mkdir', npm error path: 'E:\\网页\\Node\\node_cache\\_cacache', 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 permis
06-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值