SyntaxError when install self_service UI


#1

HI
I follow the installation steps to integrate manageiq-ui-self_service into manageiq, When running npm install, I encounter this error:

bower ECMDERR Failed to execute “gulp wiredep”, exit code of #8 /home/centos/vaneq/manageiq-ui-self_service/node_modules/eslint/node_modules/strip-bom/index.js:2 module.exports = x => { ^ SyntaxError: Unexpected token > at Module._compile (module.js:439:25) at Object.Module._extensions…js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/centos/vaneq/manageiq-ui-self_service/node_modules/eslint/lib/config/config-file.js:23:16) at Module._compile (module.js:456:26) at Object.Module._extensions…js (module.js:474:10) at Module.load (module.js:356:32)

Additional error details:
/home/centos/vaneq/manageiq-ui-self_service/node_modules/eslint/node_modules/strip-bom/index.js:2
module.exports = x => {
^
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/centos/vaneq/manageiq-ui-self_service/node_modules/eslint/lib/config/config-file.js:23:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm ERR! Linux 3.10.0-327.13.1.el7.x86_64
npm ERR! argv “node” “/usr/bin/npm” "install"
npm ERR! node v0.10.42
npm ERR! npm v3.10.5
npm ERR! code ELIFECYCLE
npm ERR! manageiq-ui-self_service@0.0.1 install: bower install -F
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the manageiq-ui-self_service@0.0.1 install script ‘bower install -F’.
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 manageiq-ui-self_service package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower install -F
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs manageiq-ui-self_service
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls manageiq-ui-self_service
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/centos/vaneq/manageiq-ui-self_service/npm-debug.log

The code is checkout from darga branch. Does anyone meet this problem?


#2

Yes, the new version of eslint is depending on newer javascript features, not included in node 0.10.

You would need to upgrade to node 5.x or 6.x…

(Or force an earlier version of eslint, probably via npm-shrinkwrap.json)

EDIT: https://github.com/ManageIQ/manageiq-ui-self_service/issues/85


#3

exactly, Thank you!