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

mac安装vue3成功步骤

第一步:参考:Mac 安装 vue3 环境_mac 安装vue-CSDN博客

第二步:报错执行:sudo npm install -g @vue/cli 报错:npm error code EEXIST

npm error path /usr/local/bin/vue

npm error EEXIST: file already exists

npm error File exists: /usr/local/bin/vue

npm error Remove the existing file and try again, or run npm

npm error with --force to overwrite files recklessly.

npm error A complete log of this run can be found in: /Users/kevnwang/.npm/_logs/2024-08-26T08_17_51_227Z-debug-0.log

解决方法:

在终端中执行以下命令:sudo rm /usr/local/bin/vue

第三步:执行:vue create my-project 报错如下:

npm error code EACCES

npm error syscall open

npm error path /Users/kevnwang/.npm/_cacache/index-v5/15/40/0ebcbd9ca76d672114d6e06dd5204999f3fd585e151ee938026539f7b335

npm error errno EACCES

npm error

npm error Your cache folder contains root-owned files, due to a bug in

npm error previous versions of npm which has since been addressed.

npm error

npm error To permanently fix this problem, please run:

npm error sudo chown -R 501:20 "/Users/kevnwang/.npm"

npm error A complete log of this run can be found in: /Users/kevnwang/.npm/_logs/2024-08-26T08_34_12_573Z-debug-0.log

ERROR Error: command failed: npm install --loglevel error --legacy-peer-deps

Error: command failed: npm install --loglevel error --legacy-peer-deps

at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@vue/cli/lib/util/executeCommand.js:138:16)

at ChildProcess.emit (node:events:520:28)

at maybeClose (node:internal/child_process:1105:16)

at ChildProcess._handle.onexit (node:internal/child_process:305:5)

解决方法:

执行:sudo chown -R 501:20 "/Users/kevnwang/.npm"


http://www.kler.cn/news/283403.html

相关文章:

  • STM32F1+HAL库+FreeTOTS学习7——列表和列表项
  • 养老小程序源码家政服务小程序开发方案
  • C# 爬虫技术:京东视频内容抓取的实战案例分析
  • 设计模式 13 责任链模式
  • 搭建webRTC cotrun流媒体服务器
  • Python中的命令模式:如何设计灵活的命令体系
  • Redis持久化方式、常见问题及解决方案
  • centos安装docker并配置加速器
  • Keil5 Debug模式Watch窗口添加的监控变量被自动清除
  • 【智能算法改进】多策略融合的改进黑猩猩搜索算法及其应用
  • 备忘录模式 详解
  • 电脑强制退出程序快捷键
  • pytorch交叉熵损失函数
  • 效果媲美GPT4V的多模态大型语言模型MiniCPM-V-2_6详细介绍
  • 数据结构(邓俊辉)学习笔记】串 03——KMP算法:记忆法
  • python批量生成sql用于创建500个用户
  • 从数据库中查找单词
  • JAVA电子器件制造行业生产管理系统计算机毕设计算机毕业设计
  • 2024.8.30(使用docker部署project-exam-system)
  • 20.神经网络 - 搭建小实战和 Sequential 的使用
  • 自动化数据汇总:使用Python从多个数据源汇总数据
  • linux查找mysql日志
  • 艾体宝干货丨Redis与MongoDB的区别
  • 自动化通过cmd命令行并以特定账户连接到远程机器
  • 【香橙派系列教程】(二十一) 基于OrangePi Zero2的系统移植— 交叉编译工具链配置
  • 【C++ 面试 - 内存管理】每日 3 题(九)
  • 算法中常用的排序
  • 云计算实训37——Dockerfile的应用+私有仓库的创建与管理
  • 更改图片中的部分颜色及修改图片的背景色
  • 如何知道当前网卡连接的下位机的IP,通过工具实现