npm安装appium 报错( Refusing to delete 和文件已存在)

npm install -g appium
npm ERR! code EEXIST
npm ERR! path C:\Users\33785\AppData\Roaming\npm\node_modules\appium\node_modules\_jimp@0.5.6@jimp\node_modules\@jimp\custom\node_modules\@jimp\core\node_modules\.bin\pixelmatch.ps1
npm ERR! Refusing to delete C:\Users\33785\AppData\Roaming\npm\node_modules\appium\node_modules\_jimp@0.5.6@jimp\node_modules\@jimp\custom\node_modules\@jimp\core\node_modules\.bin\pixelmatch.ps1: ../../../../_pixelmatch@4.0.2@pixelmatch/bin/pixelmatch symlink target is not controlled by npm C:\Users\33785\AppData\Roaming\npm\node_modules\appium\node_modules\_jimp@0.5.6@jimp\node_modules\@jimp\custom\node_modules\@jimp\core\node_modules\pixelmatch
npm ERR! File exists: C:\Users\33785\AppData\Roaming\npm\node_modules\appium\node_modules\_jimp@0.5.6@jimp\node_modules\@jimp\custom\node_modules\@jimp\core\node_modules\.bin\pixelmatch.ps1
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\33785\AppData\Roaming\npm-cache\_logs\2022-01-18T01_56_07_764Z-debug.log

查看原因提示 文件已存在
解决办法:
找到对应的node_modules 删除,我删除的是下发目录的文件

C:\Users\33785\AppData\Roaming\npm\node_modules\appium\node_modules\_jimp@0.5.6@jimp\node_modules\@jimp\custom\node_modules\@jimp\core\

再次安装提示成功

npm install -g appium
C:\Users\33785\AppData\Roaming\npm\appium -> C:\Users\33785\AppData\Roaming\npm\node_modules\appium\build\lib\main.js

> appium-windows-driver@1.19.1 install C:\Users\33785\AppData\Roaming\npm\node_modules\appium\node_modules\appium-windows-driver
> node install-npm.js

info WinAppDriver WinAppDriver doesn't exist, setting up
You are not running as an administrator so WinAppDriver cannot be installed for you; please reinstall as admin
WinAppDriver was not installed; please check your system and re-run npm install if you need WinAppDriver

> core-js@2.6.12 postinstall C:\Users\33785\AppData\Roaming\npm\node_modules\appium\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> appium-chromedriver@4.27.3 postinstall C:\Users\33785\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver
> node install-npm.js

dbug ChromedriverStorageClient Parsed 554 entries from storage XML
info ChromedriverStorageClient The total count of entries in the mapping: 394
dbug ChromedriverStorageClient Selecting chromedrivers whose versions match to 91.0.4472.101
dbug ChromedriverStorageClient Got 4 items
dbug ChromedriverStorageClient Selecting chromedrivers whose platform matches to win32
dbug ChromedriverStorageClient Got 1 item
dbug ChromedriverStorageClient Got 1 driver to sync: [
dbug ChromedriverStorageClient   "91.0.4472.101/chromedriver_win32.zip"
dbug ChromedriverStorageClient ]
dbug ChromedriverStorageClient Retrieving 'https://chromedriver.storage.googleapis.com/91.0.4472.101/chromedriver_win32.zip' to 'C:\Users\33785\AppData\Local\Temp\2022018-16916-y952pt.dykg8\0.zip'
dbug Support Traversed 1 directory and 1 file in 3ms
dbug ChromedriverStorageClient Moving the extracted 'chromedriver.exe' to 'C:\Users\33785\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver_win32_v91.0.4472.101.exe'
dbug ChromedriverStorageClient Permissions of the file 'C:\Users\33785\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver_win32_v91.0.4472.101.exe' have been changed to 755
info ChromedriverStorageClient Successfully synchronized 1 chromedriver
+ appium@1.22.2
added 108 packages from 29 contributors, removed 6277 packages and updated 578 packages in 34.589s
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值