在AngularJS教程项目中运行Protractor时出错

时间:2019-05-22 20:33:33

标签: angularjs protractor

我正在浏览AngularJS教程PhoneCat项目。

大多数事物都可以正常工作,包括npm startnpm test(尽管它们只能与sudo一起使用)。

但是`npm运行量角器给了我这些错误:

$ npm run protractor

> angular-phonecat@0.0.0 preprotractor /Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat
> npm run update-webdriver


> angular-phonecat@0.0.0 preupdate-webdriver /Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat
> npm install


> angular-phonecat@0.0.0 postinstall /Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat
> npm run copy-libs


> angular-phonecat@0.0.0 copy-libs /Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat
> cpx "node_modules/{angular,angular-*,bootstrap/dist}/**/*" app/lib -C

Failed to clean: EACCES: permission denied, unlink 'app/lib/angular-animate/angular-animate.js'.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-phonecat@0.0.0 copy-libs: `cpx "node_modules/{angular,angular-*,bootstrap/dist}/**/*" app/lib -C`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the angular-phonecat@0.0.0 copy-libs script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/TuzsNewMacBook/.npm/_logs/2019-05-22T20_31_36_208Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-phonecat@0.0.0 postinstall: `npm run copy-libs`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the angular-phonecat@0.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/TuzsNewMacBook/.npm/_logs/2019-05-22T20_31_36_236Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-phonecat@0.0.0 preupdate-webdriver: `npm install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the angular-phonecat@0.0.0 preupdate-webdriver script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/TuzsNewMacBook/.npm/_logs/2019-05-22T20_31_40_119Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-phonecat@0.0.0 preprotractor: `npm run update-webdriver`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the angular-phonecat@0.0.0 preprotractor script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/TuzsNewMacBook/.npm/_logs/2019-05-22T20_31_40_150Z-debug.log
[16:31:40] ((HEAD detached at step-9)) angular-phonecat

如果我使用sudo运行它,则会收到此错误:

$ sudo npm run protractor

> angular-phonecat@0.0.0 preprotractor /Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat
> npm run update-webdriver


> angular-phonecat@0.0.0 preupdate-webdriver /Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat
> npm install

npm WARN lifecycle angular-phonecat@0.0.0~postinstall: cannot run in wd angular-phonecat@0.0.0 npm run copy-libs (wd=/Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat)
audited 3778 packages in 9.657s
found 6 vulnerabilities (2 low, 1 moderate, 3 high)
  run `npm audit fix` to fix them, or `npm audit` for details

> angular-phonecat@0.0.0 update-webdriver /Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat
> webdriver-manager update

[16:32:44] I/update - chromedriver: file exists /Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.46.zip
[16:32:44] I/update - chromedriver: unzipping chromedriver_2.46.zip
[16:32:44] I/update - chromedriver: setting permissions to 0755 for /Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.46
[16:32:44] I/update - chromedriver: chromedriver_2.46 up to date
[16:32:44] I/update - selenium standalone: file exists /Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-4.0.0-alpha-1.zip.jar
[16:32:44] I/update - selenium standalone: selenium-server-standalone-4.0.0-alpha-1.zip.jar up to date
[16:32:45] I/update - geckodriver: file exists /Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.24.0.tar.gz
[16:32:45] I/update - geckodriver: unzipping geckodriver-v0.24.0.tar.gz
[16:32:45] I/update - geckodriver: setting permissions to 0755 for /Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.24.0
[16:32:45] I/update - geckodriver: geckodriver-v0.24.0 up to date

> angular-phonecat@0.0.0 protractor /Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat
> protractor e2e-tests/protractor.conf.js

[16:32:46] I/launcher - Running 1 instances of WebDriver
[16:32:46] I/local - Starting selenium standalone server...
[16:32:46] E/launcher - Error: Error: Server terminated early with status 1
    at earlyTermination.catch.e (/Users/TuzsNewMacBook/Development/code/AngularJS/angular-phonecat/node_modules/selenium-webdriver/remote/index.js:252:52)
    at process._tickCallback (internal/process/next_tick.js:68:7)
[16:32:46] E/launcher - Process exited with error code 100
npm ERR! code ELIFECYCLE
npm ERR! errno 100
npm ERR! angular-phonecat@0.0.0 protractor: `protractor e2e-tests/protractor.conf.js`
npm ERR! Exit status 100
npm ERR! 
npm ERR! Failed at the angular-phonecat@0.0.0 protractor script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/TuzsNewMacBook/.npm/_logs/2019-05-22T20_32_46_225Z-debug.log

有人知道怎么了吗?从错误或调试日志看来,我似乎无法分辨。

0 个答案:

没有答案