raineorshine / solgraph

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm install -g gives ENOENT

jorisbontje opened this issue · comments

$ npm install -g solgraph
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/Users/mids/.node/lib
└── (empty)

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/Cellar/node/5.8.0/bin/node" "/Users/mids/.node/bin/npm" "install" "-g" "solgraph"
npm ERR! node v5.8.0
npm ERR! npm  v3.4.0
npm ERR! path /Users/mids/.node/lib/node_modules/solgraph/dist/solgraph.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/mids/.node/lib/node_modules/solgraph/dist/solgraph.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! /Users/mids/npm-debug.log
npm ERR! code 1

Same here

nick@devbox:~/myproject$ npm install --save -g solgraph
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/home/nick/.npm-global/lib
└── (empty)

npm WARN optional Skipping failed optional dependency /solgraph/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12
npm ERR! Linux 4.4.0-28-generic
npm ERR! argv "/usr/local/bin/node" "/usr/bin/npm" "install" "--save" "-g" "solgraph"
npm ERR! node v6.2.1
npm ERR! npm  v3.9.5
npm ERR! path /home/nick/.npm-global/lib/node_modules/solgraph/dist/solgraph.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/home/nick/.npm-global/lib/node_modules/solgraph/dist/solgraph.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/nick/.npm-global/lib/node_modules/solgraph/dist/solgraph.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /home/nick/myproject/npm-debug.log
npm ERR! code 1

I think it probably has to do with the node life cycle. It is linking the binary before it does the postinstall step. I'm going to investigate to see if that's the case.

https://stackoverflow.com/questions/17990647/npm-install-errors-with-error-enoent-chmod

Ok it looks like NPM is using your .gitignore as a base for the .npmignore file, and thus ignores /lib. If you add a blank .npmignore file into the root of your application, everything should work.

@jorisbontje Trying that now.

Thanks @jorisbontje! I would not have found that on my own.