aurajs / aura

A scalable, event-driven JavaScript architecture for developing component-based applications.
MIT License
2.94k stars 255 forks source link

Install/build failed #286

Closed MarkSwanson closed 11 years ago

MarkSwanson commented 11 years ago

$ grunt build Running "jshint:all" (jshint) task

12 files lint free.

Running "connect:server" (connect) task Started connect web server on localhost:8899.

Running "mocha:all" (mocha) task Testing: http://localhost:8899/spec/index.html

Warning: PhantomJS timed out, possibly due to a missing Mocha run() call. Use --force to continue.

Aborted due to warnings.

Node: 0.10.12. Ubuntu 12.04 x86.

sbellity commented 11 years ago

You probably forgot to run bower install to install the dependencies. Let me know if this is not the case...

MarkSwanson commented 11 years ago

This is not the case.

$ bower install bower cloning git://github.com/documentcloud/underscore.git bower cached git://github.com/requirejs/text bower fetching requirejs-text bower cloning git://github.com/requirejs/text bower cloning git://github.com/jrburke/requirejs bower cached git://github.com/documentcloud/underscore.git bower fetching underscore bower cached git://github.com/jrburke/requirejs bower fetching requirejs bower cloning git://github.com/components/jquery.git bower cached git://github.com/components/jquery.git bower fetching jquery bower cloning git://github.com/hij1nx/EventEmitter2 bower cached git://github.com/hij1nx/EventEmitter2 bower fetching eventemitter2 bower checking out requirejs-text#2.0.7 bower copying /home/mswanson/.bower/cache/requirejs-text/c95a5152b859fd06bd5d98f8cbf4afe9 bower checking out jquery#1.9.1 bower checking out eventemitter2#v0.4.11 bower warn Package jquery is still using the deprecated "component.json" file bower checking out requirejs#2.1.6 bower copying /home/mswanson/.bower/cache/eventemitter2/d3fd0f36c0d92f8a20962f82bc59bc13 bower copying /home/mswanson/.bower/cache/jquery/29cb4373d29144ca260ac7c3997f4381 bower copying /home/mswanson/.bower/cache/requirejs/ca377b0e482cd657ed20ebfa063ade1a bower checking out underscore#1.4.4 bower copying /home/mswanson/.bower/cache/underscore/bb6098c6b4516eabbaea4e7f6a49cdf7 bower installing eventemitter2#0.4.11 bower installing jquery#1.9.1 bower installing requirejs#2.1.6 bower installing requirejs-text#2.0.7 bower installing underscore#1.4.4

$ grunt build Running "jshint:all" (jshint) task

12 files lint free.

Running "connect:server" (connect) task Started connect web server on localhost:8899.

Running "mocha:all" (mocha) task Testing: http://localhost:8899/spec/index.html

Warning: PhantomJS timed out, possibly due to a missing Mocha run() call. Use --force to continue.

Aborted due to warnings.

On Thu, Jul 4, 2013 at 2:41 PM, Stephane Bellity notifications@github.comwrote:

You probably forgot to run bower install to install the dependencies. Let me know if this is not the case...

— Reply to this email directly or view it on GitHubhttps://github.com/aurajs/aura/issues/286#issuecomment-20489497 .

sbellity commented 11 years ago

hum... It's a mess, I've waisted so much time trying to debug those PhantomJS issues ! I know that some versions of PhantomJS on some environments just dont work well with this setting, and it very hard to debug.

Can you tell me if the tests run inside the browser ?

grunt --force

and

then point your browser to

http://localhost:8899/spec/index.html

What's your environment ? (OS / Node version / PhantomJS version ?)

MarkSwanson commented 11 years ago

grunt --force seems to get me further:

$ grunt --force Running "jshint:all" (jshint) task

12 files lint free.

Running "connect:server" (connect) task Started connect web server on localhost:8899.

Running "mocha:all" (mocha) task Testing: http://localhost:8899/spec/index.html

Warning: PhantomJS timed out, possibly due to a missing Mocha run() call. Used --force, continuing.

Running "watch" task Waiting..

However, using the lynx text browser (it's all I have on this remote box) just gives me a blank page.

I grep'd around trying to find the right place to change 'localhost' to '0.0.0.0' so I could view the page with Firefox but it wasn't obvious...

I tried:

grunt build --force

It fails like this:

Running "requirejs:compile" (requirejs) task

Tracing dependencies for: /home/mswanson/src/external/aura/dist/aura.js Error: ENOENT, no such file or directory '/home/mswanson/src/external/aura/components/eventemitter2/lib/eventemitter2.js' In module tree: aura/ext/mediator

[Error: Error: ENOENT, no such file or directory '/home/mswanson/src/external/aura/components/eventemitter2/lib/eventemitter2.js' In module tree: aura/ext/mediator

at Object.fs.openSync (fs.js:427:18)

]

I notice the path is wrong: "components" looks like it should be "bower_components".

On Sat, Jul 6, 2013 at 3:32 PM, Stephane Bellity notifications@github.comwrote:

hum... It's a mess, I've waisted so much time trying to debug those PhantomJS issues ! I know that some versions of PhantomJS on some environments just dont work well with this setting, and it very hard to debug.

Can you tell me if the tests run inside the browser ?

grunt --force

and

then point your browser to

http://localhost:8899/spec/index.html

What's your environment ? (OS / Node version / PhantomJS version ?)

— Reply to this email directly or view it on GitHubhttps://github.com/aurajs/aura/issues/286#issuecomment-20559582 .

sbellity commented 11 years ago

Alright, so... back to my first idea : can you check if the 'components' dir actually has the vendored lib installed ?

'/home/mswanson/src/external/aura/components/eventemitter2/lib/eventemitter2.js'

should be there !

PhantomJS is timing out because requirejs cannot load them

MarkSwanson commented 11 years ago

Fix:

Also, my environment is:

i686/x86, ubuntu 12.04, node v0.10.12, phantomJS: er... I don't seem to have it installed? The aura requirements/install instructions didn't mention it? Did I miss it? I'm off to install it...

On Sat, Jul 6, 2013 at 3:32 PM, Stephane Bellity notifications@github.comwrote:

hum... It's a mess, I've waisted so much time trying to debug those PhantomJS issues ! I know that some versions of PhantomJS on some environments just dont work well with this setting, and it very hard to debug.

Can you tell me if the tests run inside the browser ?

grunt --force

and

then point your browser to

http://localhost:8899/spec/index.html

What's your environment ? (OS / Node version / PhantomJS version ?)

— Reply to this email directly or view it on GitHubhttps://github.com/aurajs/aura/issues/286#issuecomment-20559582 .

sbellity commented 11 years ago

Alright, I get it now.

Bower has changed the name of its default directory from 'components' to 'bower_components'

We probably should add a .bowerrc file to avoid the problem.

MarkSwanson commented 11 years ago

FYI I installed phantomjs 1.9.1. Then I rm -rf aura, then I followed the website directions. 'components' does not exist. It still is 'bower_components'. phantomjs still times out: Warning: PhantomJS timed out, possibly due to a missing Mocha run() call. Use --force to continue.

Still, with 'grunt --force' I get the dist/aura.js file so I assume I should be able to move forward porting some of my components.

On Sat, Jul 6, 2013 at 4:19 PM, Stephane Bellity notifications@github.comwrote:

Alright, so... back to my first idea : can you check if the 'components' dir actually has the vendored lib installed ?

'/home/mswanson/src/external/aura/components/eventemitter2/lib/eventemitter2.js'

should be there !

PhantomJS is timing out because requirejs cannot load them

— Reply to this email directly or view it on GitHubhttps://github.com/aurajs/aura/issues/286#issuecomment-20560380 .

sbellity commented 11 years ago

I am going to update all 'components' to 'bower_components' and add a .bowerrc file

sbellity commented 11 years ago

I just added a .bowerrc file for the moment. We will change references to 'components' -> 'bower_components' in the 0.9 release.

Can you try to pull master and re-run a bower install

MarkSwanson commented 11 years ago

Double win:

  1. the patch to rename components to bower_components is no longer required.
  2. the phantomjs tests work.

Everything seems to work without errors now.

On Sat, Jul 6, 2013 at 4:42 PM, Stephane Bellity notifications@github.comwrote:

I just added a .bowerrc file for the moment. We will change references to 'components' -> 'bower_components' in the 0.9 release.

Can you try to pull master and re-run a bower install

— Reply to this email directly or view it on GitHubhttps://github.com/aurajs/aura/issues/286#issuecomment-20560692 .

sbellity commented 11 years ago

Cool, thanks @MarkSwanson !

Closing this then.