linux-on-ibm-z / docs

A collection of instructions and tutorials to help you get your favorite software up and running on Linux on z
147 stars 57 forks source link

incompatible phamtonjs for Ubuntu? #9

Closed djc2k closed 6 years ago

djc2k commented 6 years ago

Environment: LinuxONE Community Cloud, Ubuntu 16.04.3 LTS

Got the following errors in step 3 (Build Grafana frontend): make deps-js

root@lxub0001:/data/src/github.com/grafana/grafana# make deps-js yarn install --pure-lockfile --no-progress yarn install v0.27.5 [1/4] Resolving packages... [2/4] Fetching packages... warning fsevents@1.0.17: The platform "linux" is incompatible with this module. info "fsevents@1.0.17" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... error /data/src/github.com/grafana/grafana/node_modules/phantomjs-prebuilt: Command failed. Exit code: 1 Command: sh Arguments: -c node install.js Directory: /data/src/github.com/grafana/grafana/node_modules/phantomjs-prebuilt Output: Considering PhantomJS found at /usr/bin/phantomjs Found PhantomJS at /usr/bin/phantomjs ...verifying Error verifying phantomjs, continuing { Error: Command failed: /usr/bin/phantomjs --version QXcbConnection: Could not connect to display PhantomJS has crashed. Please read the bug reporting guide at http://phantomjs.org/bug-reporting.html and file a bug report.

at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Socket.<anonymous> (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:498:12)

killed: false, code: null, signal: 'SIGABRT', cmd: '/usr/bin/phantomjs --version' } Unexpected platform or architecture: linux/s390x It seems there is no binary available for your platform/architecture Try to install PhantomJS globally info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. Makefile:7: recipe for target 'deps-js' failed make: *** [deps-js] Error 1 root@lxub0001:/data/src/github.com/grafana/grafana# make deps-js yarn install --pure-lockfile --no-progress yarn install v0.27.5 [1/4] Resolving packages... [2/4] Fetching packages... warning fsevents@1.0.17: The platform "linux" is incompatible with this module. info "fsevents@1.0.17" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... Done in 17.64s. root@lxub0001:/data/src/github.com/grafana/grafana# make build-js npm run build

grafana@4.4.1 build /data/src/github.com/grafana/grafana ./node_modules/grunt-cli/bin/grunt

Version 4.4.1 Loading "sass.js" tasks...ERROR

Error: Node Sass does not yet support your current environment: Linux Unsupported architecture (s390x) with Node.js 6.x For more information on which environments are supported please see: https://github.com/sass/node-sass/releases/tag/v3.13.1

Running "clean:gen" (clean) task

0 paths cleaned.

Running "jscs:src" (jscs) task

84 files without code style errors.

Running "jshint:source" (jshint) task

✔ No problems

Running "jshint:tests" (jshint) task

✔ No problems

Running "copy:node_modules" (copy) task Created 100 directories, copied 1596 files

Running "copy:public_to_gen" (copy) task Created 338 directories, copied 2720 files

Running "exec:tslint" (exec) task

Running "phantomjs" task Warning: Unable to read "./node_modules/phantomjs-prebuilt/lib/location.js" file (Error code: ENOENT). Use --force to continue.

Aborted due to warnings.

npm ERR! Linux 4.4.0-91-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! code ELIFECYCLE npm ERR! grafana@4.4.1 build: ./node_modules/grunt-cli/bin/grunt npm ERR! Exit status 3 npm ERR! npm ERR! Failed at the grafana@4.4.1 build script './node_modules/grunt-cli/bin/grunt'. 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 grafana package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! ./node_modules/grunt-cli/bin/grunt npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs grafana npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls grafana npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /data/src/github.com/grafana/grafana/npm-debug.log Makefile:15: recipe for target 'build-js' failed make: *** [build-js] Error 1 root@lxub0001:/data/src/github.com/grafana/grafana# npm install grunt npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.2 root@lxub0001:/data/src/github.com/grafana/grafana#

cwsolee commented 6 years ago

Did u build go for private use?

djc2k commented 6 years ago

No, for public use.

aborkar-ibm commented 6 years ago

Can you try out the following steps (On Ubuntu) and retry: apt-get remove phantomjs apt-get install phantomjs export QT_QPA_PLATFORM=offscreen After this, Continue with the remaining instructions in Step 3.

djc2k commented 6 years ago

Now I'm getting error in the very last step: make build-js

root@lxub0001:/data/src/github.com/grafana/grafana# make build-js npm run build

grafana@4.4.1 build /data/src/github.com/grafana/grafana ./node_modules/grunt-cli/bin/grunt

Version 4.4.1 Loading "sass.js" tasks...ERROR

Error: Node Sass does not yet support your current environment: Linux Unsupported architecture (s390x) with Node.js 6.x For more information on which environments are supported please see: https://github.com/sass/node-sass/releases/tag/v3.13.1

Running "clean:gen" (clean) task

1 path cleaned.

Running "jscs:src" (jscs) task

84 files without code style errors.

Running "jshint:source" (jshint) task

✔ No problems

Running "jshint:tests" (jshint) task

✔ No problems

Running "copy:node_modules" (copy) task Created 100 directories, copied 1596 files

Running "copy:public_to_gen" (copy) task Created 338 directories, copied 2720 files

Running "exec:tslint" (exec) task

Running "phantomjs" task Warning: Unable to read "./node_modules/phantomjs-prebuilt/lib/location.js" file (Error code: ENOENT). Use --force to continue.

Aborted due to warnings.

npm ERR! Linux 4.4.0-91-generic npm ERR! argv "/data/ibm/node/bin/node" "/usr/local/bin/npm" "run" "build" npm ERR! node v6.10.0 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! grafana@4.4.1 build: ./node_modules/grunt-cli/bin/grunt npm ERR! Exit status 3 npm ERR! npm ERR! Failed at the grafana@4.4.1 build script './node_modules/grunt-cli/bin/grunt'. 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 grafana package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! ./node_modules/grunt-cli/bin/grunt npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs grafana npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls grafana npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /data/src/github.com/grafana/grafana/npm-debug.log Makefile:15: recipe for target 'build-js' failed make: *** [build-js] Error 1 root@lxub0001:/data/src/github.com/grafana/grafana#

aborkar-ibm commented 6 years ago

Hello,

Are you performing the steps on a clean VM. If not can you remove the previous installation/configuration and redo as below:

mv $GOPATH/src $GOPATH/src.old
apt-get remove -y phantomjs

Resume installation from Step 2

djc2k commented 6 years ago

It was on a clean system, but I did the rebuild anyways and got the same error. The problem seems to be Node.js 6.x does not support s390x.


root@lxub0001:/data/src/github.com/grafana/grafana# make build-js npm run build

grafana@4.4.1 build /data/src/github.com/grafana/grafana ./node_modules/grunt-cli/bin/grunt

Version 4.4.1 Loading "sass.js" tasks...ERROR

Error: Node Sass does not yet support your current environment: Linux Unsupported architecture (s390x) with Node.js 6.x For more information on which environments are supported please see: https://github.com/sass/node-sass/releases/tag/v3.13.1

Running "clean:gen" (clean) task

0 paths cleaned.

Running "jscs:src" (jscs) task

84 files without code style errors.

Running "jshint:source" (jshint) task

✔ No problems

Running "jshint:tests" (jshint) task

✔ No problems

Running "copy:node_modules" (copy) task Created 100 directories, copied 1596 files

Running "copy:public_to_gen" (copy) task Created 338 directories, copied 2720 files

Running "exec:tslint" (exec) task

Running "phantomjs" task Warning: Unable to read "./node_modules/phantomjs-prebuilt/lib/location.js" file (Error code: ENOENT). Use --force to continue.

Aborted due to warnings.

npm ERR! Linux 4.4.0-93-generic npm ERR! argv "/data/ibm/node/bin/node" "/usr/local/bin/npm" "run" "build" npm ERR! node v6.10.0 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! grafana@4.4.1 build: ./node_modules/grunt-cli/bin/grunt npm ERR! Exit status 3 npm ERR! npm ERR! Failed at the grafana@4.4.1 build script './node_modules/grunt-cli/bin/grunt'. 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 grafana package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! ./node_modules/grunt-cli/bin/grunt npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs grafana npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls grafana npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /data/src/github.com/grafana/grafana/npm-debug.log Makefile:15: recipe for target 'build-js' failed make: *** [build-js] Error 1

djc2k commented 6 years ago

rebuild worked