envone / ember-runner

EmberJS preview and build tool for Node.JS
MIT License
50 stars 6 forks source link

Error: TypeError: Cannot call method 'forEach' of undefined #47

Closed lukaiser closed 11 years ago

lukaiser commented 11 years ago

After adding a static and image folder to my project and call it in the less-file, I get the following error. It remains now, even though I've deleted all of it.

[task:checkConfig] Started
[task:configure] Started
[task:clean] Started
[vendors] Started
[apps] Started
[ 'ember' ]
[task:checkPackages] Started
[task:walk] Started
[build] Started
[Build] Package: handlebars
[Build] Package: ember
[Build] Package: ember-data
[Build] Package: .DS_Store
[ 'ember' ]
[TEMPLATES] Building templates for: ember

/usr/local/lib/node_modules/ember-runner/lib/packages.js:742
        pack.scannedStyles.forEach(function(style) {
                           ^
TypeError: Cannot call method 'forEach' of undefined
    at /usr/local/lib/node_modules/ember-runner/lib/packages.js:742:28
    at Array.forEach (native)
    at distributeIt (/usr/local/lib/node_modules/ember-runner/lib/packages.js:739:19)
    at /usr/local/lib/node_modules/ember-runner/index.js:35:16
    at iterate (/usr/local/lib/node_modules/ember-runner/node_modules/async/lib/async.js:123:13)
    at /usr/local/lib/node_modules/ember-runner/node_modules/async/lib/async.js:138:29
    at /usr/local/lib/node_modules/ember-runner/lib/packages.js:889:34
    at /usr/local/lib/node_modules/ember-runner/node_modules/async/lib/async.js:107:25
    at /usr/local/lib/node_modules/ember-runner/node_modules/async/lib/async.js:24:16
    at /usr/local/lib/node_modules/ember-runner/lib/packages.js:880:9

Any ideas? Thanks a lot!

lukaiser commented 11 years ago

I've deleted the .git folder of my projekt. now everything is working fine :S

juan77 commented 11 years ago

Hi @lukaiser, we need to improve these files that start with dot, particularly .DS_Store, that causes to crash, I have an manually workaround that is by deleting these files in a folder with that command:

find . -name ".DS_Store" -depth -exec rm {} \;

envone commented 11 years ago

Hi, I have figured out, now checks when building the distribution info of these folders that are in the apps folder, and ignores these that starts with dot and check if are a directory too. I have published a new version in npm (0.1.35) registry. Please use it :D. I will close, feel free to open if this problem is back. thanks!