dequelabs / axe-cli

[Deprecated] A command-line interface for the aXe accessibility testing engine
Mozilla Public License 2.0
430 stars 44 forks source link

Installation Fails Ubuntu #129

Closed halburgiss closed 4 years ago

halburgiss commented 4 years ago

On Ubuntu 16.04:

root@lancelot:~# npm install axe-cli -g /usr/local/bin/axe -> /usr/local/lib/node_modules/axe-cli/axe-cli

chromedriver@78.0.1 install /usr/local/lib/node_modules/axe-cli/node_modules/chromedriver node install.js

ChromeDriver binary exists. Validating... ChromeDriver 78.0.3904.70 (edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800})

ChromeDriver is already available at '/tmp/78.0.3904.70/chromedriver/chromedriver'. Copying to target path /usr/local/lib/node_modules/axe-cli/node_modules/chromedriver/lib/chromedriver ChromeDriver installation failed { Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/axe-cli/node_modules/chromedriver/lib/chromedriver' at Object.mkdirSync (fs.js:729:3) at /usr/local/lib/node_modules/axe-cli/node_modules/chromedriver/install.js:283:10 errno: -13, syscall: 'mkdir', code: 'EACCES', path: '/usr/local/lib/node_modules/axe-cli/node_modules/chromedriver/lib/chromedriver' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! chromedriver@78.0.1 install: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the chromedriver@78.0.1 install 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! /root/.npm/_logs/2019-11-05T21_48_44_831Z-debug.log

root@lancelot:~# node --version v10.8.0

root@lancelot:~# npm --version 6.13.0

The logs do not have anything more informative. The permissions on /usr/local/lib/node_modules are fine, 755. None of the folder structure is created.

root@lancelot:~# ll /usr/local/lib/node_modules/ total 60 drwxr-xr-x 15 root root 4096 Nov 5 16:48 ./ drwxr-xr-x 7 root root 4096 Aug 7 15:30 ../ drwxr-xr-x 5 root root 4096 Jul 26 11:11 broken-link-checker/ drwxr-xr-x 8 root root 4096 Dec 11 2018 cordova/ drwxr-xr-x 6 root root 4096 Feb 21 2019 forever/ drwxr-xr-x 4 root root 4096 Apr 17 2019 gulp/ drwxr-xr-x 6 root root 4096 Apr 17 2019 gulp-cli/ drwxr-xr-x 5 root root 4096 Feb 21 2019 ionic/ drwxr-xr-x 4 root root 4096 Sep 5 2018 n/ drwxr-xr-x 11 root root 4096 Nov 5 16:48 npm/ drwxr-xr-x 6 root root 4096 Feb 21 2019 pm2/ drwxr-xr-x 3 root root 4096 Oct 2 2018 @shopify/ drwxr-xr-x 4 root root 4096 Feb 21 2019 typings/ drwxr-xr-x 5 root root 4096 Feb 21 2019 vuepress/ drwxr-xr-x 4 root root 4096 Feb 21 2019 yarn/

The only thing I can find is a broken symlink:

/usr/local/bin/axe -> ../lib/node_modules/axe-cli/axe-cli

Thanks.

straker commented 4 years ago

I'm not sure why chromedriver is unable to install on Ubuntu. Looking at chromedriver issues, someone did mention that it didn't work on 32-bit systems https://github.com/giggio/node-chromedriver/issues/147.

halburgiss commented 4 years ago

Thanks. This is on a 64bit system. I have a previously installed version of chromedrive in /usr/local/bin that I was using with Selenium. Any chance there is a conflict of some kind?

straker commented 4 years ago

Hard to say. Chromedriver is a fickle beast and has caused us tons of headaches. There's an option you can try to point it to the already installed version that might work https://github.com/dequelabs/axe-cli#chromedriver-path.

halburgiss commented 4 years ago

My immediate problem is when the install blows up, the filesystem is restored to the way it was, or maybe just nothing is ever created. The /usr/local/lib/node_modules/axe-cli/ directory does not exist. I've tried creating that manually, thinking maybe it will remain, but no, it's removed. Let me try manually installing and see where that gets me.

halburgiss commented 4 years ago

Installing manually and then running npm install, seems to work just fine on a quick test. Is there any downside to that? Thx.

halburgiss commented 4 years ago

This is working well enough, except when the npm global option is included. Not sure why, but otherwise we are good. Thx

straker commented 4 years ago

Glad it's working out. Ok if we close?

halburgiss commented 4 years ago

Yes, please close!