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

npm install -g react-native-cli 报错:errno -4048

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

安装全局react-native 命令行

npm install -g react-native-cli
npm ERR! path C:\Program Files\nodejs\node_modules\.staging
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall mkdir
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging'
npm ERR!  { [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging']
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'mkdir',
npm ERR!      path: 'C:\\Program Files\\nodejs\\node_modules\\.staging' },
npm ERR!   stack:
npm ERR!    'Error: EPERM: operation not permitted, mkdir \'C:\\Program Files\\nodejs\\node_modules\\.staging\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: 'C:\\Program Files\\nodejs\\node_modules\\.staging' }
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 (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\admin\AppData\Roaming\npm-cache\_logs\2019-03-12T07_40_35_613Z-debug.log
  • 问题环境:window10系统下 问题诊断:没有用户权限,打开命令行,以管理员权限启动
  • 再执行命令就可以成功安装了,这个坑,我也是经常遇见,安装全局 -g 的时候就会遇到

转载于:https://my.oschina.net/shuaihong/blog/3021443

相关文章:

  • 如何在GitHub上创建个人博客
  • layDay日期格式不合法报错解决
  • 静态路由实验
  • 第2部分 Elasticsearch查询-请求体查询、排序
  • 利用Python绘制一个正方形螺旋线
  • OPPO大数据平台运营研发实践分享
  • 没有一个技术天生完美,MongoDB十年发展全纪录
  • 嵌入式软件架构设计
  • Go之如何提取数字的各个位数?
  • 已开源|码上用它开始Flutter混合开发——FlutterBoost
  • Mybatis的bind动态SQL
  • 【翻译】构建响应式系统-vue
  • 程序是什么?如何理解编程的本质?
  • centos7.5+cobbler2.8.4实战图文攻略--2019持续更新
  • Node.js设计模式读书笔记(2)
  • CSS3 变换
  • es6(二):字符串的扩展
  • ES6之路之模块详解
  • Mithril.js 入门介绍
  • Quartz实现数据同步 | 从0开始构建SpringCloud微服务(3)
  • Vue全家桶实现一个Web App
  • XML已死 ?
  • 个人博客开发系列:评论功能之GitHub账号OAuth授权
  • 工作踩坑系列——https访问遇到“已阻止载入混合活动内容”
  • 记录:CentOS7.2配置LNMP环境记录
  • 简单易用的leetcode开发测试工具(npm)
  • 模型微调
  • 前端相关框架总和
  • 如何解决微信端直接跳WAP端
  • 如何进阶一名有竞争力的程序员?
  • 说说动画卡顿的解决方案
  • 鱼骨图 - 如何绘制?
  • 运行时添加log4j2的appender
  • ​DB-Engines 12月数据库排名: PostgreSQL有望获得「2020年度数据库」荣誉?
  • ​Kaggle X光肺炎检测比赛第二名方案解析 | CVPR 2020 Workshop
  • ###项目技术发展史
  • #android不同版本废弃api,新api。
  • #LLM入门|Prompt#3.3_存储_Memory
  • (06)金属布线——为半导体注入生命的连接
  • (1)Nginx简介和安装教程
  • (java)关于Thread的挂起和恢复
  • (Python第六天)文件处理
  • (八)Docker网络跨主机通讯vxlan和vlan
  • (牛客腾讯思维编程题)编码编码分组打印下标题目分析
  • (区间dp) (经典例题) 石子合并
  • (三)mysql_MYSQL(三)
  • (转)原始图像数据和PDF中的图像数据
  • .L0CK3D来袭:如何保护您的数据免受致命攻击
  • .net经典笔试题
  • .NET中的Exception处理(C#)
  • .project文件
  • .sh文件怎么运行_创建优化的Go镜像文件以及踩过的坑
  • @EnableConfigurationProperties注解使用
  • @ModelAttribute 注解
  • [20170705]diff比较执行结果的内容.txt