npm i tenpay 卡主,下不动怎么办?

在做微信支付使用tenpay的时候,突然下不动,查看日志发现:

1730 error     syscall: 'rename',
1730 error     path: 'C:\\Users\\Cocowy\\Desktop\\\\WxWeb\\cloud\\pay\\node_modules\\.staging\\http-proxy-agent-77e2b883',
1730 error     dest: 'C:\\Users\\Cocowy\\Desktop\\\\WxWeb\\cloud\\pay\\node_modules\\http-proxy-agent'
1730 error   },
1730 error   errno: -4048,
1730 error   code: 'EPERM',
1730 error   syscall: 'rename',
1730 error   path: 'C:\\Users\\Cocowy\\Desktop\\\\WxWeb\\cloud\\pay\\node_modules\\.staging\\http-proxy-agent-77e2b883',
1730 error   dest: 'C:\\Users\\Cocowy\\Desktop\\\\WxWeb\\cloud\\pay\\node_modules\\http-proxy-agent',
1730 error   parent: 'pay'
1730 error }
1731 error The operation was rejected by your operating system.
1731 error It's possible that the file was already in use (by a text editor or antivirus),
1731 error or that you lack permissions to access it.
1731 error
1731 error If you believe this might be a permissions issue, please double-check the
1731 error permissions of the file and its containing directories, or try running
1731 error the command again as root/Administrator.
1732 verbose exit [ -4048, true ]

之后发现因为文件名存在中文,于是将名字改成英文,接着再次npm安装一次,至此就成功了。
如果嫌麻烦的朋友可以将所有文件都关了,先改文件夹名,直接从文件夹进cmd,然后再安装完后再改回名字即可!

上一篇:Python 调用支付宝沙箱接口 实现 扫码支付


下一篇:mysql left jion 一个结果集