npm现在未安装量角器 [英] Protractor not installed now with npm
问题描述
我尝试使用 npm install -g量角器
全局安装量角器,这是错误消息,我在任何情况下都知道。
我以前在全球范围内安装了量角器,并且运行良好。
Here is the error message,I got it in every case. I installed globally the protractor before,and worked well.
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'lstat',
npm WARN path: 'c:\\x\\y\npm\\node_modules\\protractor\\node_modules\\web
driver-manager\\node_modules' }
npm ERR! path c:\x\y\npm\node_modules\protractor\node_modules\.webdriver-man
ager.DELETE\selenium\chromedriver_2.26.exe
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'c:\x\y\npm\node_modu
les\protractor\node_modules\.webdriver-manager.DELETE\selenium\chromedriver_2.26
.exe'
npm ERR! { Error: EPERM: operation not permitted, unlink 'c:\x\y\npm\node_m
odules\protractor\node_modules\.webdriver-manager.DELETE\selenium\chromedriver_2
.26.exe'
npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, unlink 'c:\x\y\npm\node
_modules\protractor\node_modules\.webdriver-manager.DELETE\selenium\chromedriver
_2.26.exe'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'c:\\x\\y\\npm\\node_modules\\protractor\\node_modules\\
.webdriver-manager.DELETE\\selenium\\chromedriver_2.26.exe' },
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'c:\\x\\y\
\npm\\node_modules\\protractor\\node_modules\\.webdriver-manager.DELETE\\seleniu
m\\chromedriver_2.26.exe\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'c:\\x\\y\\npm\\node_modules\\protractor\\node_modules\\.we
bdriver-manager.DELETE\\selenium\\chromedriver_2.26.exe',
npm ERR! parent: 'protractor' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! c:\x\y\local\npm-cache\_logs\2017-08-22T15_38_20_888Z-debug.log
我对此无能为力。
这个有什么想法吗。
I can not do anything to this. Is there any idea to this one.
推荐答案
下载并安装NPM时,请确保您具有最新版本。
打开命令提示符并键入。安装可能需要一段时间。
When you download and install NPM make sure you have the latest version. Open your command prompt and type this. This might take a while to install.
npm install npm @ latest -g
npm install npm@latest -g
或者尝试这个链接
使用此命令检查npm版本后
After checking your npm version with this command
npm --version
npm --version
键入此项以安装量角器
npm install -g量角器
npm install -g protractor
然后通过检查您拥有的版本来检查量角器是否成功安装
Then check if protractor was successfully installed by checking the version you have
量角器--version
protractor --version
这篇关于npm现在未安装量角器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!