码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • npm-install 命令报错 -4048


    PS D:\WebStormCode\CssLearn> npm install
    npm WARN logfile could not create logs-dir: Error: EPERM: operation not permitted, mkdir 'E:\vue\nodejs\node_cache\_logs'                                  
    npm WARN logfile could not be created: Error: ENOENT: no such file or directory, open 'E:\vue\nodejs\node_cache\_logs\2022-11-28T00_56_43_699Z-debug-0.log'
    npm WARN logfile could not create logs-dir: Error: EPERM: operation not permitted, mkdir 'E:\vue\nodejs\node_cache\_logs'                                  
    npm WARN logfile could not be created: Error: ENOENT: no such file or directory, open 'E:\vue\nodejs\node_cache\_logs\2022-11-28T00_56_44_630Z-debug-0.log'
    npm WARN old lockfile 
    npm WARN old lockfile The package-lock.json file was created with an old version of npm,
    npm WARN old lockfile so supplemental metadata must be fetched from the registry.
    npm WARN old lockfile
    npm WARN old lockfile This is a one-time fix-up, please be patient...
    npm WARN old lockfile
    npm ERR! code EPERM
    npm ERR! syscall mkdir
    npm ERR! path E:\vue\nodejs\node_cache\_cacache
    npm ERR! errno -4048
    npm ERR! Error: EPERM: operation not permitted, mkdir 'E:\vue\nodejs\node_cache\_cacache'
    npm ERR!  [Error: EPERM: operation not permitted, mkdir 'E:\vue\nodejs\node_cache\_cacache'] {
    npm ERR!   errno: -4048,
    npm ERR!   code: 'EPERM',
    npm ERR!   syscall: 'mkdir',
    npm ERR!   path: 'E:\\vue\\nodejs\\node_cache\\_cacache'
    npm ERR! }
    npm ERR!
    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! Log files were not written due to an error writing to the directory: E:\vue\nodejs\node_cache\_logs
    npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33

    首先先看系统环境配置和用户环境配置的参数是否一致
    点入系统环境配置中的path,观察路径是否一致,这里有可能是我个人的原因,重新安装node好几次导致这里的路径不一致,更改后发现依旧不可以后。

    解决方法:

    1. 找到 C:\Users{账户}\下的.npmrc 文件,删除
    2. 再清除npm缓存:npm cache clean --force
    3. 再运行npm install命令即可。

    文章原地址:https://blog.csdn.net/weixin_44129867/article/details/126508964

  • 相关阅读:
    神策分析 2.5 上线「经营分析」:可视化分析能力重磅升级!
    Kindle下线在即 使用cpolar建立自己的电子书图书馆
    一个简单的HTML网页 、个人主页网页设计(HTML+CSS)
    C++ Reference: Standard C++ Library reference: C Library: ctime: difftime
    基于Springboot搭建java项目(十六)——Kafka的简介
    2-Dubbo架构设计与底层原理-SPI源码分析
    Spring Boot文档阅读笔记-CORS Support
    效率提升利器:Automa插件的实用指南
    很久没写JAVA程序了,原来用GMAIL发送邮件这么简单
    【Linux】Makefile文件简单介绍
  • 原文地址:https://blog.csdn.net/qq_44275015/article/details/128073409
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号