GithubHelp home page GithubHelp logo

Parse errors about solgraph HOT 11 CLOSED

raineorshine avatar raineorshine commented on April 29, 2024
Parse errors

from solgraph.

Comments (11)

raineorshine avatar raineorshine commented on April 29, 2024 2

Thank you! This should be remedied as soon as we upgrade to the latest version of solidity.

from solgraph.

raineorshine avatar raineorshine commented on April 29, 2024 1

Fixed in v0.3.0.

Only omission is that constructor and fallback are being labeled null. Tracked in #28.

from solgraph.

drandreaskrueger avatar drandreaskrueger commented on April 29, 2024 1

this now seems to work fine:

git clone https://github.com/raiden-network/raiden-contracts raiden-network_raiden-contracts
cd raiden-network_raiden-contracts/raiden_contracts/contracts/
find . -type f -name "*.sol" -printf "solgraph %p > %p.dot\n" | bash
find . -type f -name "*.dot" -printf "dot -Tpng %p > %p.png\n" | bash

and there is one png file for each sol file:

find . -type f -name "*.sol" | wc
     17      17     442
find . -type f -name "*.png" | wc
     17      17     578

from solgraph.

drandreaskrueger avatar drandreaskrueger commented on April 29, 2024
sudo npm install -g solgraph

npm WARN deprecated @babel/[email protected]: 👋 We've deprecated any official yearly presets in 6.x in favor or babel-preset-env. For 7.x it would be @babel/preset-env.
/usr/local/bin/solgraph -> /usr/local/lib/node_modules/solgraph/solgraph.js

> [email protected] postinstall /usr/local/lib/node_modules/solgraph
> npm run build

npm ERR! path /root/.npm/_logs
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall scandir
npm ERR! Error: EACCES: permission denied, scandir '/root/.npm/_logs'
npm ERR!  { Error: EACCES: permission denied, scandir '/root/.npm/_logs'
npm ERR!   stack: 'Error: EACCES: permission denied, scandir \'/root/.npm/_logs\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'scandir',
npm ERR!   path: '/root/.npm/_logs' }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
glob error { Error: EACCES: permission denied, scandir '/root/.npm/_logs'
  stack: 'Error: EACCES: permission denied, scandir \'/root/.npm/_logs\'',
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path: '/root/.npm/_logs' }

> [email protected] build /usr/local/lib/node_modules/solgraph
> babel -d dist src

{ Error: Cannot find module '@babel/preset-es2015' from '/usr/local/lib/node_modules/solgraph'
    at Function.module.exports [as sync] (/usr/local/lib/node_modules/solgraph/node_modules/resolve/lib/sync.js:43:15)
    at resolveStandardizedName (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/files/plugins.js:101:31)
    at resolvePreset (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/files/plugins.js:58:10)
    at loadPreset (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/files/plugins.js:77:20)
    at createDescriptor (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:114:9)
    at items.map (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:69:50)
    at Array.map (<anonymous>)
    at createDescriptors (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:69:29)
    at createPresetDescriptors (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:61:10)
    at presets (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:43:19) code: 'MODULE_NOT_FOUND' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `babel -d dist src`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/solgraph/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 243
npm ERR! [email protected] postinstall: `npm run build`
npm ERR! Exit status 243
npm ERR! 
npm ERR! Failed at the [email protected] postinstall 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!     /root/.npm/_logs/2018-08-06T12_58_33_649Z-debug.log

npm install solgraph

npm WARN deprecated @babel/[email protected]: 👋 We've deprecated any official yearly presets in 6.x in favor or babel-preset-env. For 7.x it would be @babel/preset-env.

> [email protected] postinstall /home/akrueger/node_modules/solgraph
> npm run build


> [email protected] build /home/akrueger/node_modules/solgraph
> babel -d dist src

{ Error: Cannot find module '@babel/preset-es2015' from '/home/akrueger/node_modules/solgraph'
    at Function.module.exports [as sync] (/home/akrueger/node_modules/resolve/lib/sync.js:43:15)
    at resolveStandardizedName (/home/akrueger/node_modules/@babel/core/lib/config/files/plugins.js:101:31)
    at resolvePreset (/home/akrueger/node_modules/@babel/core/lib/config/files/plugins.js:58:10)
    at loadPreset (/home/akrueger/node_modules/@babel/core/lib/config/files/plugins.js:77:20)
    at createDescriptor (/home/akrueger/node_modules/@babel/core/lib/config/config-descriptors.js:114:9)
    at items.map (/home/akrueger/node_modules/@babel/core/lib/config/config-descriptors.js:69:50)
    at Array.map (<anonymous>)
    at createDescriptors (/home/akrueger/node_modules/@babel/core/lib/config/config-descriptors.js:69:29)
    at createPresetDescriptors (/home/akrueger/node_modules/@babel/core/lib/config/config-descriptors.js:61:10)
    at presets (/home/akrueger/node_modules/@babel/core/lib/config/config-descriptors.js:43:19) code: 'MODULE_NOT_FOUND' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `babel -d dist src`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/akrueger/.npm/_logs/2018-08-06T13_00_18_382Z-debug.log
npm WARN enoent ENOENT: no such file or directory, open '/home/akrueger/package.json'
npm WARN akrueger No description
npm WARN akrueger No repository field.
npm WARN akrueger No README data
npm WARN akrueger No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `npm run build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall 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/akrueger/.npm/_logs/2018-08-06T13_00_18_910Z-debug.log

from solgraph.

raineorshine avatar raineorshine commented on April 29, 2024

@drandreaskrueger Can you try this?

sudo npm install -g solgraph --unsafe-perm=true --allow-root

from solgraph.

drandreaskrueger avatar drandreaskrueger commented on April 29, 2024
sudo npm install -g solgraph --unsafe-perm=true --allow-root
npm WARN deprecated @babel/[email protected]: 👋 We've deprecated any official yearly presets in 6.x in favor or babel-preset-env. For 7.x it would be @babel/preset-env.
/usr/local/bin/solgraph -> /usr/local/lib/node_modules/solgraph/solgraph.js

> [email protected] postinstall /usr/local/lib/node_modules/solgraph
> npm run build


> [email protected] build /usr/local/lib/node_modules/solgraph
> babel -d dist src

{ Error: Cannot find module '@babel/preset-es2015' from '/usr/local/lib/node_modules/solgraph'
    at Function.module.exports [as sync] (/usr/local/lib/node_modules/solgraph/node_modules/resolve/lib/sync.js:43:15)
    at resolveStandardizedName (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/files/plugins.js:101:31)
    at resolvePreset (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/files/plugins.js:58:10)
    at loadPreset (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/files/plugins.js:77:20)
    at createDescriptor (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:114:9)
    at items.map (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:69:50)
    at Array.map (<anonymous>)
    at createDescriptors (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:69:29)
    at createPresetDescriptors (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:61:10)
    at presets (/usr/local/lib/node_modules/solgraph/node_modules/@babel/core/lib/config/config-descriptors.js:43:19) code: 'MODULE_NOT_FOUND' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `babel -d dist src`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build 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!     /root/.npm/_logs/2018-08-20T07_57_27_556Z-debug.log
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/[email protected] requires a peer of @babel/core@>=7.0.0-beta.50 <7.0.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/solgraph/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `npm run build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall 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!     /root/.npm/_logs/2018-08-20T07_57_28_045Z-debug.log

from solgraph.

raineorshine avatar raineorshine commented on April 29, 2024

@drandreaskrueger Just fixed the babel error and published to v0.3.3

from solgraph.

drandreaskrueger avatar drandreaskrueger commented on April 29, 2024
sudo npm install -g solgraph --unsafe-perm=true --allow-root
/usr/local/bin/solgraph -> /usr/local/lib/node_modules/solgraph/solgraph.js

> [email protected] postinstall /usr/local/lib/node_modules/solgraph
> npm run build


> [email protected] build /usr/local/lib/node_modules/solgraph
> babel -d dist src

Successfully compiled 2 files with Babel.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/solgraph/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ [email protected]
added 338 packages from 430 contributors in 9.956s

from solgraph.

drandreaskrueger avatar drandreaskrueger commented on April 29, 2024

Thanks!!

from solgraph.

sharadkapilsharma avatar sharadkapilsharma commented on April 29, 2024

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 [email protected]: 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

[email protected] postinstall /usr/local/lib/node_modules/solgraph
npm run build

[email protected] 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! [email protected] build: babel -d dist src
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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: [email protected]
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! [email protected] postinstall: npm run build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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

from solgraph.

raineorshine avatar raineorshine commented on April 29, 2024

@sharadkapilsharma solgraph requires node >= 6

from solgraph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.