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

buttercoin doesn't build on ubuntu #55

Open
nranjan opened this issue Jun 5, 2013 · 8 comments
Open

buttercoin doesn't build on ubuntu #55

nranjan opened this issue Jun 5, 2013 · 8 comments

Comments

@nranjan
Copy link

nranjan commented Jun 5, 2013

I fixed issue in 54 by updating node using n.
I am building buttercoin on ubuntu linux; this is the error that I am getting now,

module.js:340
throw err;
^
Error: Cannot find module 'graceful-fs'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/share/npm/lib/utils/ini.js:32:10)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

I looked around and was wondering is this is relevant http://stackoverflow.com/questions/16600209/require-cannot-find-custom-module-after-moving-to-server

Has the team actually ever tried building buttercoin on ubuntu system?

@RevCBH
Copy link
Contributor

RevCBH commented Jun 5, 2013

I have built on 12.10. The biggest issue is that the default nodejs in the apt repo is 0.8.x and buttercoin requires at least 0.10.x.

If you're on node < 0.10 give these instructions a try: http://slopjong.de/2012/10/31/how-to-install-the-latest-nodejs-in-ubuntu/

If that doesn't fix it please let me know!

@nranjan
Copy link
Author

nranjan commented Jun 5, 2013

Thanks, that solved the last issue, I was able to complete npm install with the following warning messages (which I assumed is not an issue):

npm WARN package.json connect@2.7.6 No readme data.
npm WARN package.json isnode@0.0.1 No readme data.
npm WARN package.json chained-emitter@0.1.0 No repository field.
npm WARN package.json chained-emitter@0.1.0 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json engine.io-client@0.5.0 No repository field.
npm WARN package.json methods@0.0.1 No repository field.
npm WARN package.json methods@0.0.1 No readme data.
npm WARN package.json debug@0.6.0 No repository field.
npm WARN package.json cookie-signature@1.0.1 No repository field.
npm WARN package.json fresh@0.1.0 No repository field.
npm WARN package.json range-parser@0.0.4 No repository field.
npm WARN package.json send@0.1.0 No repository field.

However, there was the following failure during the npm test phase:

buttercoin@0.0.3 test /home/nranjan/buttercoin
sh test.sh

events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)

@nranjan
Copy link
Author

nranjan commented Jun 5, 2013

And this is the problem with npm start

buttercoin@0.0.3 start /home/nranjan/buttercoin
bin/dev-standalone

Error: Cannot find module 'options'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/nranjan/buttercoin/node_modules/ws/lib/WebSocket.js:14:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/nranjan/buttercoin/node_modules/ws/index.js:7:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/nranjan/buttercoin/lib/ews/ws_listener.coffee:7:21)
at Object. (/home/nranjan/buttercoin/lib/ews/ws_listener.coffee:84:4)
at Module._compile (module.js:456:26)
at Object.loadFile (/home/nranjan/buttercoin/node_modules/coffee-script/lib/coffee-script/coffee-script.js:24:19)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/nranjan/buttercoin/lib/ews/ew_server.coffee:13:23)
at Object. (/home/nranjan/buttercoin/lib/ews/ew_server.coffee:125:4)
at Module._compile (module.js:456:26)
at Object.loadFile (/home/nranjan/buttercoin/node_modules/coffee-script/lib/coffee-script/coffee-script.js:24:19)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/nranjan/buttercoin/bin/dev-standalone:5:27)
at Object. (/home/nranjan/buttercoin/bin/dev-standalone:17:4)
at Module._compile (module.js:456:26)
at Object.exports.run (/home/nranjan/buttercoin/node_modules/coffee-script/lib/coffee-script/coffee-script.js:124:25)
at compileScript (/home/nranjan/buttercoin/node_modules/coffee-script/lib/coffee-script/command.js:166:29)
at /home/nranjan/buttercoin/node_modules/coffee-script/lib/coffee-script/command.js:141:18
at fs.js:266:14
at Object.oncomplete (fs.js:107:15)
npm ERR! weird error 1
npm ERR! not ok code 0

@pghalliday
Copy link
Contributor

I have just added a Vagrant config that sets up a Ubuntu 12.04 server virtual environment and everything seems to work OK on that. If you want to use it then see https://github.com/buttercoin/buttercoin/blob/master/doc/VAGRANT.md

@nranjan
Copy link
Author

nranjan commented Jun 5, 2013

I just spent the last few hours setting up vagrant, on my 32 bit Ubuntu 12.04 machine, the steps for setting up vagrant for a 32 bit Ubuntu 12.04 box misses one step vagrant init precise32 http://files.vagrantup.com/precise32.box.

I upgraded the node.js version to greater than 0.10 as suggested in the last post, still I'm getting the exact same problem that I posted above. Looks like that is the center of the issue.

@pghalliday
Copy link
Contributor

You shouldn't have needed to run vagrant init. There is already a Vagrantfile in the project. You do need to run the vagrant commands from the the root of the project though. I will add that to the readme.

It also occurred to me that the Vagrantfile references a 64 bit Ubuntu image from https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box

If you're on a 32bit host i'm not sure how it will deal with a 64bit VM (I never tried that)

@jcrubino
Copy link

I am using the vagrant methods to get buttercoin up and runing but this has come up.
Googled and could not find the fix for this.

vagrant@buttercoin:/vagrant$ npm test

buttercoin@0.0.3 test /vagrant
sh test.sh

events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)

@pghalliday
Copy link
Contributor

I just did this:

$ git clone https://github.com/buttercoin/buttercoin.git
$ cd buttercoin
$ vagrant up
$ vagrant ssh
vagrant@buttercoin:~$ cd /vagrant/
vagrant@buttercoin:/vagrant$ npm install
vagrant@buttercoin:/vagrant$ npm test

and it worked fine.

What host OS are you using?

On a windows host I have had to resave test.sh with unix line endings after the checkout so that it doesn't get confused when calling cake with the test task.

Also at work I have to run the following from within the VM before npm install in order to workaround a firewall issue with git urls.

vagrant@buttercoin:/vagrant$ git config --global url."https://".insteadOf git://

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