Installing v3 : npm run package:discover fails


#1

Installing on a Centos machine, details below.

Command history

243 git clone -b v3 --single-branch https://github.com/os-js/OS.js.git
244 ls
245 cd OS.js/
246 ls
247 npm install
248 ls
249 npm run package:discover

No apparent errors until that last step

[esbadm@r2-mq OS.js]$ npm run package:discover

@osjs/osjs@3.0.0-alpha.27 package:discover /home/esbadm/projects/OS.js
osjs-cli package:discover

/home/esbadm/projects/OS.js/node_modules/@osjs/cli/bin/cli.js:32
const {cli} = require(’…/index.js’);
^

SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions…js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:140:18)
at node.js:1043:3

npm ERR! Linux 3.10.0-693.11.6.el7.x86_64
npm ERR! argv “/opt/ibm/iib/iib-10.0.0.10/common/node/bin/node” “/opt/ibm/iib/iib-10.0.0.10/common/node/bin/npm” “run” “package:discover”
npm ERR! node v4.8.4
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! @osjs/osjs@3.0.0-alpha.27 package:discover: osjs-cli package:discover
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @osjs/osjs@3.0.0-alpha.27 package:discover script ‘osjs-cli package:discover’.
npm ERR! This is most likely a problem with the @osjs/osjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:


#2

Apologies, there was an old version of node on my PATH.


#3

Sad to say that I still get the error:

[esbadm@r2-mq OS.js]$ node --version
v8.11.4
[esbadm@r2-mq OS.js]$ npm --version
5.6.0
[esbadm@r2-mq OS.js]$ npm run package:discover

@osjs/osjs@3.0.0-alpha.27 package:discover /home/esbadm/projects/OS.js
osjs-cli package:discover

/home/esbadm/projects/OS.js/node_modules/@osjs/cli/bin/cli.js:32
const {cli} = require(’…/index.js’);
^

SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions…js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:140:18)
at node.js:1043:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @osjs/osjs@3.0.0-alpha.27 package:discover: osjs-cli package:discover
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @osjs/osjs@3.0.0-alpha.27 package:discover 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! /home/esbadm/.npm/_logs/2018-08-21T10_08_01_595Z-debug.log


#4

Well, there’s obviously no syntax errors there. Do you get the same error when you run npx osjs-cli package:discover ?


#5

[esbadm@r2-mq OS.js]$ npx osjs-cli package:discover
Unexpected token {
[esbadm@r2-mq OS.js]$

Looks like a similar complaint


#6

And if you do node node_modules/.bin/osjs-cli package:discover ?


#7

node_modules/.bin/osjs-cli package:discover
/home/esbadm/projects/OS.js/node_modules/@osjs/cli/bin/cli.js:32
const {cli} = require(’…/index.js’);
^

SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions…js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:140:18)
at node.js:1043:3


#8

OK, apologies. my PATH still had an old version of node and npm taking precedence, so sub processes were picking up the old one