kriskbx / gitlab-time-tracker

🦊🕘 A command line interface for GitLab's time tracking feature.
GNU General Public License v2.0
452 stars 83 forks source link

Phantomjs dependency fails to install when using NPM #59

Closed sils closed 6 years ago

sils commented 6 years ago
sils@lsnmb ~ % sudo npm install -g gitlab-time-tracker               
/usr/bin/gtt -> /usr/lib/node_modules/gitlab-time-tracker/src/gtt.js

> phantomjs-prebuilt@2.1.16 install /usr/lib/node_modules/gitlab-time-tracker/node_modules/phantomjs-prebuilt
> node install.js

Considering PhantomJS found at /usr/bin/phantomjs
Looks like an `npm install -g`
Could not link global install, skipping...
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /usr/lib/node_modules/gitlab-time-tracker/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1530863800673/phantomjs-2.1.1-linux-x86_64 -> /usr/lib/node_modules/gitlab-time-tracker/node_modules/phantomjs-prebuilt/lib/phantom
chmod failed: phantomjs was not successfully copied to /usr/lib/node_modules/gitlab-time-tracker/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 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/2018-07-06T07_56_45_067Z-debug.log
sudo npm install -g gitlab-time-tracker  12.34s user 1.56s system 97% cpu 14.208 total

See also related bug https://github.com/Medium/phantomjs/issues/730

kriskbx commented 6 years ago

I removed some unused PDF related modules and bumped the version of the underlying markdown-pdf library. Unfortunately I cannot reproduce the issue, but this could solve it. Could you try again using version 1.7.13?

kriskbx commented 6 years ago

If you still experience this problem, feel free to reopen and the issue. :)