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

g2 fails to start #1

Open
talpadk opened this issue Jul 22, 2017 · 4 comments
Open

g2 fails to start #1

talpadk opened this issue Jul 22, 2017 · 4 comments

Comments

@talpadk
Copy link

talpadk commented Jul 22, 2017

On Debian unstable using the packaged nodejs I get:

talpa@Hermes ~ $ g2
/usr/lib/node_modules/g2core-api/bin/g2.js:7
let G2coreAPI = require('../');
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
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

talpa@Hermes ~ $ node --version
v4.8.4

I have also tried the LTS version of nodejs and npm installing g2core-api locally:

talpa@Hermes node-v6.11.1-linux-x64 $ bin/node ./node_modules/.bin/g2
(node:6765) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: x is not defined

The code seems to want a more specific version of nodejs that the README.md file indicates

@cmcgrath5035
Copy link

Same issue observed here using openSUSE Leap 42.2, where the most recent packaged node.js is version 4.7.3-5.3.1

@cmcgrath5035
Copy link

cmcgrath5035 commented Jul 29, 2017

This is the first time I have tried node.js
When I decided to experiment with cncjs, I found their "How to load node".
So removed all the openSUSE packages, then followed the nodejs how-to, loading nvm from git, then loaded node6, node7 and node8.
By experiment, g2core-api needs node8 to load all it's dependencies.

Was able to run g2 console, sort of.
On startup, g2 core does not find the port, but specifying it did work.
What displays on the console only sort of useful, but looking in the log file displays more of what I expected. I used the -v option at startup, perhaps it is not working properly

Two logfiles and a console scrape attached.
In logfile1, I was just figuring out how things worked, before I locked up the machine.

console_scrape2.txt
testlog2.txt
testlog1.txt

@tomasBjornfot
Copy link

Change version of node and it will work:
My bash file:
#!/bin/bash
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
wget https://github.com/synthetos/node-g2core-api/archive/master.zip
unzip master.zip
sudo npm install 'g2core-api'

@justinclift
Copy link
Member

@talpadk Did you get around to trying the newer node version? 😄

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

4 participants