Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroku deployment fails due to PhantomJS #10

Closed
jekuno opened this issue Apr 3, 2017 · 7 comments
Closed

Heroku deployment fails due to PhantomJS #10

jekuno opened this issue Apr 3, 2017 · 7 comments
Assignees

Comments

@jekuno
Copy link

jekuno commented Apr 3, 2017

Deploying RocketChat to Heroku using https://heroku.com/deploy?template=https://github.com/RocketChat/Rocket.Chat/tree/master fails when trying to install PhantomJS with:

``` Phantom installation failed { [Error: EACCES: permission denied, open '/tmp/mt-bx7s0d/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/location.js'] errno: -13, code: 'EACCES', syscall: 'open', path: '/tmp/mt-bx7s0d/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/location.js' } Error: EACCES: permission denied, open '/tmp/mt-bx7s0d/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/location.js' at Error (native) at Object.fs.openSync (fs.js:549:18) at Object.fs.writeFileSync (fs.js:1156:15) at writeLocationFile (/tmp/mt-bx7s0d/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/install.js:108:6) at Promise._successFn (/tmp/mt-bx7s0d/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/install.js:80:5) at nextTickCallback (/tmp/mt-bx7s0d/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/node_modules/kew/kew.js:47:28) at nextTickCallbackWith0Args (node.js:436:9) at process._tickCallback (node.js:365:13) npm ERR! Linux 3.13.0-112-generic npm ERR! argv "/app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.4.3_1.14xgswq++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node" "/app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.4.3_1.14xgswq++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm" "rebuild" "--update-binary" npm ERR! node v4.7.3 npm ERR! npm v4.1.2 npm ERR! code ELIFECYCLE npm ERR! phantomjs@1.9.20 install: `node install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phantomjs@1.9.20 install script 'node install.js'. ```

Why is PhantomJS needed at all for deploying RocketChat on a production system?

@etamity
Copy link

etamity commented Apr 4, 2017

i have same issue!

``` -----> Node.js app detected -----> Listing HEROKU_ environment variables HEROKU_APP_ID: HEROKU_APP_NAME: HEROKU_DYNO_ID: HEROKU_RELEASE_VERSION: HEROKU_SLUG_COMMIT: HEROKU_SLUG_DESCRIPTION: -----> Installing meteor Downloading Meteor distribution Meteor 1.4.3.2 has been installed in your home directory (~/.meteor). Now you need to do one of the following: (1) Add "$HOME/.meteor" to your path, or (2) Run this command as root: cp "/app/tmp/cache/meteor/.meteor/packages/meteor-tool/1.4.3_2/mt-os.linux.x86_64/scripts/admin/launch-meteor" /usr/bin/meteor Then to get started, take a look at 'meteor --help' or see the docs at docs.meteor.com. -----> Target Meteor version: Meteor 1.4.3.1 -----> Checking if this meteor version supports --server-only -----> Using node: v4.7.3 -----> and npm: 4.1.2 npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue > bcrypt@1.0.2 install /tmp/build_0aa00a6bf30cbbc493657c09f8c177e5/RocketChat-Rocket.Chat-13571b0/node_modules/bcrypt > node-pre-gyp install --fallback-to-build node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v46-linux-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.2 and node@4.7.3 (node-v46 ABI) (falling back to source compile with node-gyp) make: Entering directory `/tmp/build_0aa00a6bf30cbbc493657c09f8c177e5/RocketChat-Rocket.Chat-13571b0/node_modules/bcrypt/build' CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node COPY Release/bcrypt_lib.node COPY /tmp/build_0aa00a6bf30cbbc493657c09f8c177e5/RocketChat-Rocket.Chat-13571b0/node_modules/bcrypt/lib/binding/bcrypt_lib.node TOUCH Release/obj.target/action_after_build.stamp make: Leaving directory `/tmp/build_0aa00a6bf30cbbc493657c09f8c177e5/RocketChat-Rocket.Chat-13571b0/node_modules/bcrypt/build' > Rocket.Chat@0.54.2 postinstall /tmp/build_0aa00a6bf30cbbc493657c09f8c177e5/RocketChat-Rocket.Chat-13571b0 > cd packages/rocketchat-katex && npm i rocketchat-katex@1.0.0 /tmp/build_0aa00a6bf30cbbc493657c09f8c177e5/RocketChat-Rocket.Chat-13571b0/packages/rocketchat-katex └─┬ katex@0.7.1 └── match-at@0.1.0 Rocket.Chat@0.54.2 /tmp/build_0aa00a6bf30cbbc493657c09f8c177e5/RocketChat-Rocket.Chat-13571b0 ├─┬ babel-runtime@6.23.0 │ ├── core-js@2.4.1 │ └── regenerator-runtime@0.10.3 ├─┬ bcrypt@1.0.2 │ ├── bindings@1.2.1 │ ├── nan@2.5.0 │ └─┬ node-pre-gyp@0.6.32 │ ├─┬ mkdirp@0.5.1 │ │ └── minimist@0.0.8 │ ├─┬ nopt@3.0.6 │ │ └── abbrev@1.1.0 │ ├─┬ npmlog@4.0.2 │ │ ├─┬ are-we-there-yet@1.1.2 │ │ │ ├── delegates@1.0.0 │ │ │ └── readable-stream@2.2.6 │ │ ├── console-control-strings@1.1.0 │ │ ├─┬ gauge@2.7.3 │ │ │ ├── aproba@1.1.1 │ │ │ ├── has-unicode@2.0.1 │ │ │ ├── object-assign@4.1.1 │ │ │ ├── signal-exit@3.0.2 │ │ │ ├─┬ string-width@1.0.2 │ │ │ │ ├── code-point-at@1.1.0 │ │ │ │ └─┬ is-fullwidth-code-point@1.0.0 │ │ │ │ └── number-is-nan@1.0.1 │ │ │ ├─┬ strip-ansi@3.0.1 │ │ │ │ └── ansi-regex@2.1.1 │ │ │ └── wide-align@1.1.0 │ │ └── set-blocking@2.0.0 │ ├─┬ rc@1.1.7 │ │ ├── deep-extend@0.4.1 │ │ ├── ini@1.3.4 │ │ ├── minimist@1.2.0 │ │ └── strip-json-comments@2.0.1 │ ├─┬ request@2.81.0 │ │ ├── aws-sign2@0.6.0 │ │ ├── aws4@1.6.0 │ │ ├── caseless@0.12.0 │ │ ├─┬ combined-stream@1.0.5 │ │ │ └── delayed-stream@1.0.0 │ │ ├── extend@3.0.0 │ │ ├── forever-agent@0.6.1 │ │ ├─┬ form-data@2.1.2 │ │ │ └── asynckit@0.4.0 │ │ ├─┬ har-validator@4.2.1 │ │ │ ├─┬ ajv@4.11.5 │ │ │ │ ├── co@4.6.0 │ │ │ │ └─┬ json-stable-stringify@1.0.1 │ │ │ │ └── jsonify@0.0.0 │ │ │ └── har-schema@1.0.5 │ │ ├─┬ hawk@3.1.3 │ │ │ ├── boom@2.10.1 │ │ │ ├── cryptiles@2.0.5 │ │ │ ├── hoek@2.16.3 │ │ │ └── sntp@1.0.9 │ │ ├─┬ http-signature@1.1.1 │ │ │ ├── assert-plus@0.2.0 │ │ │ ├─┬ jsprim@1.4.0 │ │ │ │ ├── assert-plus@1.0.0 │ │ │ │ ├── extsprintf@1.0.2 │ │ │ │ ├── json-schema@0.2.3 │ │ │ │ └── verror@1.3.6 │ │ │ └─┬ sshpk@1.11.0 │ │ │ ├── asn1@0.2.3 │ │ │ ├── assert-plus@1.0.0 │ │ │ ├── bcrypt-pbkdf@1.0.1 │ │ │ ├─┬ dashdash@1.14.1 │ │ │ │ └── assert-plus@1.0.0 │ │ │ ├── ecc-jsbn@0.1.1 │ │ │ ├─┬ getpass@0.1.6 │ │ │ │ └── assert-plus@1.0.0 │ │ │ ├── jodid25519@1.0.2 │ │ │ ├── jsbn@0.1.1 │ │ │ └── tweetnacl@0.14.5 │ │ ├── is-typedarray@1.0.0 │ │ ├── isstream@0.1.2 │ │ ├── json-stringify-safe@5.0.1 │ │ ├── mime-types@2.1.15 │ │ ├── oauth-sign@0.8.2 │ │ ├── performance-now@0.2.0 │ │ ├── qs@6.4.0 │ │ ├── safe-buffer@5.0.1 │ │ ├── stringstream@0.0.5 │ │ ├─┬ tough-cookie@2.3.2 │ │ │ └── punycode@1.4.1 │ │ ├── tunnel-agent@0.6.0 │ │ └── uuid@3.0.1 │ ├─┬ rimraf@2.5.4 │ │ └─┬ glob@7.1.1 │ │ ├── fs.realpath@1.0.0 │ │ ├── inflight@1.0.6 │ │ ├── minimatch@3.0.3 │ │ ├── once@1.4.0 │ │ └── path-is-absolute@1.0.1 │ ├─┬ tar@2.2.1 │ │ ├── block-stream@0.0.9 │ │ ├─┬ fstream@1.0.11 │ │ │ └── graceful-fs@4.1.11 │ │ └── inherits@2.0.3 │ └─┬ tar-pack@3.3.0 │ ├─┬ debug@2.2.0 │ │ └── ms@0.7.1 │ ├── fstream-ignore@1.0.5 │ ├─┬ once@1.3.3 │ │ └── wrappy@1.0.2 │ ├─┬ readable-stream@2.1.5 │ │ ├── buffer-shims@1.0.0 │ │ ├── core-util-is@1.0.2 │ │ ├── isarray@1.0.0 │ │ ├── process-nextick-args@1.0.7 │ │ ├── string_decoder@0.10.31 │ │ └── util-deprecate@1.0.2 │ └── uid-number@0.0.6 ├── codemirror@5.25.0 ├── file-type@4.1.0 ├── highlight.js@9.10.0 ├── jquery@3.2.1 ├── mime-db@1.27.0 ├─┬ mime-type@3.0.4 │ ├── media-typer@0.3.0 │ ├─┬ minimatch@2.0.10 │ │ └─┬ brace-expansion@1.1.6 │ │ ├── balanced-match@0.4.2 │ │ └── concat-map@0.0.1 │ ├─┬ path.js@1.0.7 │ │ ├── escape-string-regexp@1.0.5 │ │ └── inherits-ex@1.1.7 │ └─┬ util-ex@0.3.15 │ └── xtend@4.0.1 ├── moment@2.18.1 ├── moment-timezone@0.5.12 ├── photoswipe@4.1.1 ├─┬ prom-client@7.2.0 │ ├─┬ tdigest@0.1.1 │ │ └── bintrees@1.0.1 │ └── util-extend@1.0.3 ├── semver@5.3.0 └── toastr@2.1.2 -----> Building Meteor app with ROOT_URL: https://swapant.herokuapp.com => Errors while initializing project: While loading emojione:emojione@2.2.6...: error: Command failed: /app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.4.3_1.1tyx4n9++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm rebuild --update-binary Phantom installation failed { [Error: EACCES: permission denied, open '/tmp/mt-179ojnr/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/location.js'] errno: -13, code: 'EACCES', syscall: 'open', path: '/tmp/mt-179ojnr/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/location.js' } Error: EACCES: permission denied, open '/tmp/mt-179ojnr/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/location.js' at Error (native) at Object.fs.openSync (fs.js:549:18) at Object.fs.writeFileSync (fs.js:1156:15) at writeLocationFile (/tmp/mt-179ojnr/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/install.js:108:6) at Promise._successFn (/tmp/mt-179ojnr/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/install.js:80:5) at nextTickCallback (/tmp/mt-179ojnr/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/node_modules/kew/kew.js:47:28) at nextTickCallbackWith0Args (node.js:436:9) at process._tickCallback (node.js:365:13) npm ERR! Linux 3.13.0-112-generic npm ERR! argv "/app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.4.3_1.1tyx4n9++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node" "/app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.4.3_1.1tyx4n9++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm" "rebuild" "--update-binary" npm ERR! node v4.7.3 npm ERR! npm v4.1.2 npm ERR! code ELIFECYCLE npm ERR! phantomjs@1.9.20 install: `node install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phantomjs@1.9.20 install script 'node install.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the phantomjs package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node install.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs phantomjs npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls phantomjs npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /tmp/mt-179ojnr/npm/node_modules/.temp-bloja4/npm-debug.log Phantom installation failed { [Error: EACCES: permission denied, open '/tmp/mt-179ojnr/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/location.js'] errno: -13, code: 'EACCES', syscall: 'open', path: '/tmp/mt-179ojnr/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/location.js' } Error: EACCES: permission denied, open '/tmp/mt-179ojnr/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/location.js' at Error (native) at Object.fs.openSync (fs.js:549:18) at Object.fs.writeFileSync (fs.js:1156:15) at writeLocationFile (/tmp/mt-179ojnr/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/install.js:108:6) at Promise._successFn (/tmp/mt-179ojnr/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/install.js:80:5) at nextTickCallback (/tmp/mt-179ojnr/npm/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/node_modules/kew/kew.js:47:28) at nextTickCallbackWith0Args (node.js:436:9) at process._tickCallback (node.js:365:13) npm ERR! Linux 3.13.0-112-generic npm ERR! argv "/app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.4.3_1.1tyx4n9++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node" "/app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.4.3_1.1tyx4n9++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm" "rebuild" "--update-binary" npm ERR! node v4.7.3 npm ERR! npm v4.1.2 npm ERR! code ELIFECYCLE npm ERR! phantomjs@1.9.20 install: `node install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phantomjs@1.9.20 install script 'node install.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the phantomjs package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node install.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs phantomjs npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls phantomjs npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /tmp/mt-179ojnr/npm/node_modules/.temp-bloja4/npm-debug.log ! Push rejected, failed to compile Node.js app. ! Push failed ```

@BadPirate
Copy link

Issue still present. Clean installation using heroku deploy button in RocketChat :(

@jekuno
Copy link
Author

jekuno commented Apr 11, 2017

Same here. Also see RocketChat/Rocket.Chat#6444 for the same Phantom installation failed { [Error: EACCES: permission denied... issue

@BadPirate
Copy link

Fails with heroku single click deployment. Fails if you git pull and then push to heroku. Fails if you switch to the :beta buildpack. Fails if you try and push from develop. Not fixed (as reported in some other thread) lots of reports, no workaround. I gave up and installed it using snap on a new ubuntu VM, but I'd rather be using heroku for free :)

@engelgabriel
Copy link
Member

@localguru
Copy link

Exactly the same here!

@sampaiodiego
Copy link
Member

Heroku deployment were fixed by the following commits:
RocketChat/Rocket.Chat@9afe9d1
3e87e6a
a383919

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants