【发布时间】:2018-07-11 19:03:23
【问题描述】:
命令: npm install --save axios
我无法安装axios。我在 Windows 中使用 reactnative 并想发出 HTTP 请求
错误
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.3 (node_modules\sane\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN eslint-plugin-react-native@3.2.1 requires a peer of eslint@^3.17.0 || ^4.0.0 but none was installed.
npm ERR! path D:\reactnative\albums\node_modules\.staging\axios-29ec864b
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'D:\reactnative\albums\node_modules\.staging\axios-29ec864b' -> 'D:\reactnative\albums\node_modules\axios'
npm ERR! { [Error: EPERM: operation not permitted, rename 'D:\reactnative\albums\node_modules\.staging\axios-29ec864b' -> 'D:\reactnative\albums\node_modules\axios']
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path:
npm ERR! 'D:\\reactnative\\albums\\node_modules\\.staging\\axios-29ec864b',
npm ERR! dest: 'D:\\reactnative\\albums\\node_modules\\axios',
npm ERR! parent: 'albums' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
【问题讨论】:
-
关闭杀毒软件并再次尝试安装模块
-
根据您的错误消息,您无权执行此操作。以管理员身份运行命令提示符
-
我只以管理员身份运行 CMD!还是不行
标签: react-native npm axios react-native-android npm-install