網站首頁 編程語言 正文
如題
報錯大致是這樣的:
npm WARN locking errno: -4048,npm WARN locking code: 'EPERM',npm WARN locking syscall: 'open',
D:\Code\Project\2021-3-1\ruoyi-vue\ruoyi-ui>npm install
npm WARN locking Error: EPERM: operation not permitted, open ‘D:\Environment\nodejs\node_cache_locks\staging-9ac46eb88defb0e8.lock’
npm WARN locking D:\Environment\nodejs\node_cache_locks\staging-9ac46eb88defb0e8.lock failed [Error: EPERM: operation not permitted, open ‘D:\Environment\nodejs\node_cache_locks\staging-9ac46eb88defb0e8.lock’] {
npm WARN locking errno: -4048,
npm WARN locking code: ‘EPERM’,
npm WARN locking syscall: ‘open’,
npm WARN locking path: ‘D:\Environment\nodejs\node_cache\_locks\staging-9ac46eb88defb0e8.lock’
npm WARN locking }
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path D:\Environment\nodejs\node_cache_locks\staging-9ac46eb88defb0e8.lock
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open ‘D:\Environment\nodejs\node_cache_locks\staging-9ac46eb88defb0e8.lock’
npm ERR! [Error: EPERM: operation not permitted, open ‘D:\Environment\nodejs\node_cache_locks\staging-9ac46eb88defb0e8.lock’] {
npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘open’,
npm ERR! path: 'D:\Environment\nodejs\node_cache\_locks\staging-9ac46eb88defb0e8.lock’
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.
原因搞明白了其實很簡單,就是無論cmd還是terminal下執行時,都不是管理員身份執行的,所以會報錯。(新的工作電腦管理員不是我,氣抖冷)
解決
兩種情況下都以管理員身份打開再次執行。(terminal的話管理員身份打開idea)
原文鏈接:https://blog.csdn.net/qq_36256590/article/details/121100483
相關推薦
- 2022-11-01 ElasticSearch寫入流程實例解析_相關技巧
- 2022-02-10 linux后臺運行任務命令(nohup: 忽略輸入并把輸出追加到“nohup.out“)
- 2022-12-22 數據清洗之如何用一行Python代碼去掉文本中的各種符號_python
- 2022-03-14 跨域:Response to preflight request doesn t pass acce
- 2022-09-23 C#實現目錄跳轉(TreeView和SplitContainer)的示例代碼_C#教程
- 2022-10-13 pytorch和tensorflow計算Flops和params的詳細過程_python
- 2022-04-26 ASP.NET?Core中的Razor頁面使用視圖組件_基礎應用
- 2022-02-11 element ui table 內嵌 input 調用 focus 方法無效
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支