raineorshine / solgraph

Visualize Solidity control flow for smart contract security analysis. :dollar: ⇆ :dollar:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

solgraph is failing on installation

sharadkapilsharma opened this issue · comments

Hi,
I am referring [https://github.com/raineorshine/solgraph]

sudo npm install -g solgraph --unsafe-perm=true --allow-root is producing am following error:

| |---------------------------------------------------------------------------------------------------------------------------------------|
WARN engine solgraph@0.3.3: wanted: {"node":">=6"} (current: {"node":"4.2.6","npm":"3.5.2"})
loadDep:solidity-parser-s / |#######################--------------------------------------------------------------------------------------|
loadDep:chokidar -> addNa | |#######################--------------------------------------------------------------------------------------|
loadDep:urix -> afterAdd \ |#######################--------------------------------------------------------------------------------------|
loadDep:semver -> get - |#########################------------------------------------------------------------------------------------|
loadDep:source-map-suppor - |#############################--------------------------------------------------------------------------------|
/usr/local/bin/solgraph -> /usr/local/lib/node_modules/solgraph/solgraph.js

solgraph@0.3.3 postinstall /usr/local/lib/node_modules/solgraph
npm run build

solgraph@0.3.3 build /usr/local/lib/node_modules/solgraph
babel -d dist src

/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/transformation/file/file.js:75
constructor(options, {
^

SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/index.js:147:36)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)

npm ERR! Linux 4.10.0-35-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! solgraph@0.3.3 build: babel -d dist src
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the solgraph@0.3.3 build script 'babel -d dist src'.
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 solgraph package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel -d dist src
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs solgraph
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls solgraph
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/lib/node_modules/solgraph/npm-debug.log
npm WARN optional Skipping failed optional dependency /solgraph/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.4
npm ERR! Linux 4.10.0-35-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "solgraph" "--unsafe-perm=true" "--allow-root"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! solgraph@0.3.3 postinstall: npm run build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the solgraph@0.3.3 postinstall script 'npm run build'.
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 solgraph package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs solgraph
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls solgraph
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/sharadsharma/work/solgraph/npm-debug.log

I tried many times, but facing same issue.

Please suggest.
Thanks

solgraph requires node >= 6

Of note is this line from your error output:

WARN engine solgraph@0.3.3: wanted: {"node":">=6"} (current: {"node":"4.2.6","npm":"3.5.2"})