metaspartan / explorer

Ethereum Block Explorer (ETHExplorer V2) - Realtime Price Ticker, Shapeshift.io Integration, etc. (Project is currently not under active development, if you have a bug fix, please open a PR) My current project can be found at https://github.com/metaspartan/denarius (D a better cryptocurrency than ETH)
Other
485 stars 330 forks source link

Error on Windows: http-server #5

Closed rfikki closed 7 years ago

rfikki commented 7 years ago

npm ERR! node v7.4.0 npm ERR! npm v4.2.0 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! EthereumExplorerV2@0.1.0 start: http-server ./app -a localhost -p 8000 -c-1 npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the EthereumExplorerV2@0.1.0 start script 'http-server ./app -a localhost -p 8000 -c-1'. 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 EthereumExplorerV2 package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! http-server ./app -a localhost -p 8000 -c-1 npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs EthereumExplorerV2 npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls EthereumExplorerV2 npm ERR! There is likely additional logging output above.

metaspartan commented 7 years ago

http-server is a npm package that this app relys on as a dependency, so you would want to run this app with just a "npm start" after you do an "npm install" the npm install will install its required dependencies.

You usually would want to start with via a "npm start" just in the main directory.

You could also try a "cd /app" to get into the main directory and then a "node app.js" and let me know what happens for you.

If you are wanting to change ports etc. I would recommend just setting up a reverse NGINX proxy server and setup to run on port 80 and to run the app from 8080.

rfikki commented 7 years ago

Yes, I did do an "npm install" and then an "npm start". That is what gave me the error above. I did as you suggested and cd to the app directory. I then did the "node app.js" as you suggested. I got this error:

:\projects\dapps\explorer-master>cd app

c:\projects\dapps\explorer-master\app>node app.js c:\projects\dapps\explorer-master\app\app.js:13 var WL=window.location; ^

ReferenceError: window is not defined at Object. (c:\projects\dapps\explorer-master\app\app.js:13:8) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.runMain (module.js:605:10) at run (bootstrap_node.js:420:7) at startup (bootstrap_node.js:139:9) at bootstrap_node.js:535:3

rfikki commented 7 years ago

here is the log when doing "npm start": https://gist.github.com/rfikki/61f0ddf493e818449ce03600b6d2de8a

metaspartan commented 7 years ago

Try using a different version of nodejs like v6.x, Let me know your log output from that from doing an npm start after downgrading your version.

Make sure your also running an npm install and bower install before doing npm start, if you look in the node_modules folder do you see a list of different modules?

susmit-git commented 7 years ago

I ran the following command npm install

It gave me error that not able to find bower. So I ran this npm install -g bower (this installed bower) npm install

Then executed following command npm start

It gave me error that not able to find http-server. So I ran this npm install -g http-server npm start

Here is the output - So it worked Starting up http-server, serving ./app Available on: http://localhost:8000

It connected to my private blockchain network. Now able to view all the blocks, accounts and transactions.

Will be exploring it more and if face any issue will share.

# Thanks for your great efforts!

metaspartan commented 7 years ago

Awesome, I would make sure you do a "bower install" after running npm install and before npm start, you shouldn't have to install http-server globally.

rfikki commented 7 years ago

Thanks will give that a try!!! Okay, that worked. Such a simple solution!!!