当前位置: 首页 > news >正文

【问题记录】npm create vue@latest报错

1,错误日志

npm error code EPERM
npm error syscall mkdir
npm error path D:\Program Files\nodejs\node_cache\_cacache
npm error errno EPERM
npm error FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/create-vue: EPERM: operation not permitted, mkdir 'D:\Program Files\nodejs\node_cache\_cacache'
npm error     at D:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\body.js:170:15
npm error     at async Response.json (D:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\body.js:75:17)
npm error     at async RegistryFetcher.packument (D:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\registry.js:98:25)
npm error     at async RegistryFetcher.manifest (D:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\registry.js:128:23)
npm error     at async getManifest (D:\Program Files\nodejs\node_modules\npm\node_modules\libnpmexec\lib\index.js:27:22)
npm error     at async missingFromTree (D:\Program Files\nodejs\node_modules\npm\node_modules\libnpmexec\lib\index.js:65:22)
npm error     at async D:\Program Files\nodejs\node_modules\npm\node_modules\libnpmexec\lib\index.js:182:32
npm error     at async Promise.all (index 0)
npm error     at async exec (D:\Program Files\nodejs\node_modules\npm\node_modules\libnpmexec\lib\index.js:180:3)
npm error     at async Init.execCreate (D:\Program Files\nodejs\node_modules\npm\lib\commands\init.js:135:5) {
npm error   code: 'EPERM',
npm error   errno: 'EPERM',
npm error   syscall: 'mkdir',
npm error   path: 'D:\\Program Files\\nodejs\\node_cache\\_cacache',
npm error   type: 'system'
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:\Program Files\nodejs\node_cache\_logs
npm error You can rerun the command with `--loglevel=verbose` to see the logs in your terminal

2,错误原因

没有管理员权限,无法在node_globalnode_cache两个文件夹下进行操作

3,解决办法

修改node_globalnode_cache文件夹的权限

1,右键文件夹-->属性-->安全

2,点击编辑-->在允许栏全部勾上-->确认-->确认

将两个文件夹的权限都修改后就不会报错。

http://www.lryc.cn/news/515866.html

相关文章:

  • OpenGL材质系统和贴图纹理
  • Markdown中类图的用法
  • 钓鱼攻击(Phishing)详解和实现 (网络安全)
  • window11 wsl mysql8 错误分析:1698 - Access denied for user ‘root‘@‘kong.mshome.net‘
  • C++线程同步之条件变量
  • 如何实现多条件搜索
  • 深入MySQL复杂查询优化技巧
  • Fabric环境部署-Git和Node安装
  • 如何弥补开源大语言模型解决推理任务的不足
  • Ubuntu 下载安装 Consul1.17.1
  • 【数据库系统概论】并发控制--复习
  • MySQL(六)MySQL 案例
  • DDcGAN_多分辨率图像融合的双鉴别条件生成对抗网络_y译文马佳义
  • [读书日志]从零开始学习Chisel 第一篇:书籍介绍,Scala与Chisel概述,Scala安装运行(敏捷硬件开发语言Chisel与数字系统设计)
  • 二、用例图
  • LWIP之一:使用STM32CubeMX搭建基于FreeRTOS的LWIP工程并分析协议栈初始化过程
  • 个性化电影推荐系统|Java|SSM|JSP|
  • UE5AI感知组件
  • 每日一学——日志管理工具(ELK Stack)
  • “智能筛查新助手:AI智能筛查分析软件系统如何改变我们的生活
  • DeepSeek v3为何爆火?如何用其集成Milvus搭建RAG?
  • linux-centos-安装miniconda3
  • html+css+js网页设计 美食 好厨艺西餐美食企业网站模板6个页面
  • QT-窗口嵌入外部exe
  • C#中使用系统默认应用程序打开文件
  • 如何在 Ubuntu 22.04 上配置 Logrotate 高级教程
  • java项目之校园管理系统的设计与实现(源码+文档)
  • 关于 webservice 日志中 源IP是node IP的问题,是否能解决换成 真实的客户端IP呢
  • Serializable接口
  • 如何操作github,gitee,gitcode三个git平台建立镜像仓库机制,这样便于维护项目只需要维护一个平台仓库地址的即可-优雅草央千澈