npm ERR! code EEXIST
npm ERR! dest C:\Users\Hm\AppData\Roaming\npm\wepy.cmd
npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\Hm\AppData\Roaming\npm\node_modules\@wepy\cli\bin\wepy.js' -> 'C:\Users\Hm\AppData\Roaming\npm\wepy.cmd'
npm ERR! File exists: C:\Users\Hm\AppData\Roaming\npm\wepy.cmd
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Hm\AppData\Roaming\npm-cache\_logs\2021-07-28T08_10_28_208Z-debug.log
运行wepy小程序项目出现上面的错误。根据提示判断之前安装的wepy1与现在的wepy2安装有冲突,解决方法如下:
1、删除文件wepy.js,wepy,wepy.cmd
找到目录C:\Users\my\AppData\Roaming\npm下删除文件wepy.js,wepy,wepy.cmd
2、重新运行
npm install @wepy/cli -g
安装成功。
文章评论(0)