node.js - FreeBSD phantomJS installation issue -
after running command below
root@hz:/data/www/node # npm phantomjs
i get
npm warn deprecated phantomjs@2.1.3: package renamed phantomjs-prebuilt. please update 'phantomjs' package references 'phantomjs-prebuilt' > phantomjs@2.1.3 install /data/www/node/node_modules/phantomjs > node install.js looks `npm install -g`; unable check installed version. downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip saving /data/www/node/node_modules/phantomjs/phantomjs/phantomjs-2.1.1-macosx.zip receiving... [=======================================-] 98% received 16746k total. extracting zip contents removing /data/www/node/node_modules/phantomjs/lib/phantom copying extracted folder /data/www/node/node_modules/phantomjs/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1454690434788/phantomjs-2.1.1-macosx -> /data/www/node/node_modules/phantomjs/lib/phantom writing location.js file done. phantomjs binary available @ /data/www/node/node_modules/phantomjs/lib/phantom/bin/phantomjs npm err! freebsd 9.3-release npm err! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "phantomjs" npm err! node v5.4.1 npm err! npm v2.14.7 npm err! code epeerinvalid npm err! peerinvalid package handlebars@4.0.2 not satisfy siblings' peerdependencies requirements! npm err! please include following file support request: npm err! /data/www/node/npm-debug.log
it seems phantomjs installed, when try phantomjs version
root@hz:/data/www/node # phantomjs --version
i this
/usr/local/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs: 1: syntax error: unterminated quoted string /usr/local/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs: 1: syntax error: error in command substitution root@hz:/data/www/node #
does know how solve problem? need run node.js server should use phantom.js, whet it's expected in used next error
[error: phantomjs exited return value 2]
you've run well-known bug of node package manager / phantomjs's npm package - it's installing macosx version of phantomjs though you're running freebsd:
> phantomjs@2.1.3 install /data/www/node/node_modules/phantomjs > node install.js ... downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip
see phantomjs issue:
https://github.com/ariya/phantomjs/issues/12963
alternatively, can install phantomjs source; freebsd has port that:
masheen(~) # cd /usr/ports/lang/phantomjs masheen(~) # make install
Comments
Post a Comment