wpfaz949 2018-10-16 07:17 采纳率: 14.3%
浏览 2545
已结题

node 安装http-server报错,这是啥情况

C:\Users\DELL\Desktop\member\member> npm install http-server -g
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: '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! parent: 'http-server' }
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\DELL\AppData\Roaming\npm-cache_logs\2018-10-16T07_10_25_840Z-debug.log
PS C:\Users\DELL\Desktop\member\member>

  • 写回答

1条回答

  • hot2dog 2018-10-16 07:34
    关注

    你的node js环境有问题, 重新检查一下

    评论

报告相同问题?

悬赏问题

  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献