ck86 / main-bower-files

Getting all main bower files
583 stars 56 forks source link

crashing even before any debug output! #27

Closed abbood closed 10 years ago

abbood commented 10 years ago

I used main-bower-files just fine in a previous angular project.. and now i was trying to use ionic.. so i started off using this start-up skeleton. Initially they saved all the bower components into the ./www/lib directory.. so i changed the contents of .bowerrc to

{
  "directory": "bower_components"
}

instead.. and so after running bower install all the bower folders got installed in the ./bower_components directory

for reference this is the contents of my bower.json file:

{
  "name": "HelloIonic",
  "private": "true",
  "devDependencies": {
    "ionic": "driftyco/ionic-bower#1.0.0-beta.10",
    "jquery": "~1.10.x",
    "angular": "1.2.18",
    "angular-sanitize": "1.2.5",
    "angular-route": "1.2.5",
    "angular-cookies": "1.2.5",
    "angular-resource": "1.2.5",
    "restangular": "1.4.0",
    "angular-animate": "~1.2.x",
    "angular-ui-slider": "~0.0.2",
    "angular-google-maps": "https://github.com/nlaplante/angular-google-maps/archive/1832e420bd60d6f42c860f44ae40ccaf6e66aec8.zip",
    "angular-easyfb": "~1.1.0",
    "bootstrap-multiselect": "~0.9.x"
  },
  "resolutions": {
    "angular-sanitize": "1.2.5",
    "angular": "1.2.18",
    "jquery": "~1.10.x"
  }
}

I got this in my gulpfile.coffee

gulp.task 'bower_js', (done) ->
  gulp.src(mainBowerFiles({debugging: true}), {base: './bower_components'})

but then I get this error when running gulp bower_js:

[18:52:42] Using gulpfile ~/dev/js/beit_ionic/gulpfile.js
[18:52:42] Starting 'bower_js'...
[18:52:42] 'bower_js' errored after 1.12 ms
[18:52:42] Error: Invalid glob argument: 
  at Gulp.src (~/dev/js/beit_ionic/node_modules/gulp/node_modules/vinyl-fs/lib/src/index.js:19:11)
  at Gulp.gulp.task.gulp.src.pipe.$.ngClassify.appName (/Users/abdullah/dev/js/beit_ionic/gulpfile.coffee:46:8)
  at module.exports (/Users/abdullah/dev/js/beit_ionic/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
  at Gulp.Orchestrator._runTask (/Users/abdullah/dev/js/beit_ionic/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
  at Gulp.Orchestrator._runStep (/Users/abdullah/dev/js/beit_ionic/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
  at Gulp.Orchestrator.start (/Users/abdullah/dev/js/beit_ionic/node_modules/gulp/node_modules/orchestrator/index.js:134:8)
  at /usr/local/lib/node_modules/gulp/bin/gulp.js:121:20
  at process._tickCallback (node.js:415:13)
  at Function.Module.runMain (module.js:499:11)
  at startup (node.js:119:16)
  at node.js:902:3

the thing is i don't even get any debugging output before it crashes although i put the debbuging:true flag.. any ideas why?

abbood commented 10 years ago

interesting.. i decided to use the bower.json file of my old "functioning" angular js project.. and it worked just fine! .. so i'm guessing it has to do with some of the missing entries in the bower.json file (for example main key perhaps? i didn't have the time for trial and error so i'll just paste my "functioning" bower.json here for future reference.. (note: i added the ionic dependency just to prove that it's not ionic's fault)

{
  "name": "angular-brunch-seed",
  "repo": "scotch/angular-brunch-seed",
  "version": "0.3.0",
  "main": "_public/js/app.js",
  "ignore": [
    "**/.*",
    "node_modules",
    "components"
  ],
  "dependencies": {
    "jquery": "~1.10.x",
    "angular": "1.2.18",
    "angular-sanitize": "1.2.5",
    "angular-route": "1.2.5",
    "angular-cookies": "1.2.5",
    "angular-resource": "1.2.5",
    "restangular": "1.4.0",
    "angular-animate": "~1.2.x",
    "angular-ui-slider": "~0.0.2",
    "angular-google-maps": "https://github.com/nlaplante/angular-google-maps/archive/1832e420bd60d6f42c860f44ae40ccaf6e66aec8.zip",
    "angular-easyfb": "~1.1.0",
    "bootstrap-multiselect": "~0.9.x",
    "ionic": "driftyco/ionic-bower#1.0.0-beta.10"
  },
  "overrides": {
    "bootstrap-less": {
      "ignore": [
        "*"
      ]
    },
    "angular-mocks": {
      "main": "README.md"
    }
  },
  "resolutions": {
    "angular": "1.2.18",
    "angular-sanitize": "~1.2.17"
  }
}
ck86 commented 10 years ago

Hey @abbood,

you are using in the first example the devDependencies which have to be explicitly included via the option includeDev.