live-server

来源:2-2 JS面向对象初步填坑

精慕门2092353

2018-11-08

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\live-server\node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs\node_modules.staging’

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! parent: ‘live-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\aaa\AppData\Roaming\npm-cache_logs\2018-11-08T09_53_49_668Z-debug.log

老师报错了,帮我解决下吧 我 npm -g update 再重新安 live-server也不行

写回答

1回答

傅猿猿

2018-11-09

唉……Windows就是这种奇怪的操作系统……,一般呢,你去添加删除程序,彻底删除node,然后删除appdata下面所有的node_modules,如何重装node,试试cnpm去安装liveserver

0
0

微信小游戏入门与实战,一天之内搞定微信小游戏开发

官方同步,第一时间掌握整套微信小游戏开发核心技术

3515 学习 · 664 问题

查看课程