CaryLandholt / fatarrow

AngularJS Reference Architecture
MIT License
28 stars 6 forks source link

Run gulp with the following options. #88

Closed matt328 closed 8 years ago

matt328 commented 8 years ago

I just cloned master, did npm install, followed by 'gulp' and there seem to be a few problems. I am using npm v3.7.3 and gulp v3.9.1.

$ gulp
[19:33:22] Requiring external module coffee-script/register
[19:33:23] Using gulpfile ~/Projects/exploratory/fatarrow/gulpfile.coffee
[19:33:23] Starting 'clean:working'...
[19:33:23] Starting 'help'...

Run gulp with the following options.

Options:
  -?               Show help                                           [boolean]
  --backend, -b    Use your own backend               [boolean] [default: false]
  --bower, -w      Force retrieve of Bower components  [boolean] [default: true]
  --help, -h       Show help                           [boolean] [default: true]
  --injectcss, -i  Injects CSS without reloading      [boolean] [default: false]
  --open, -o       Open app from browser-sync         [boolean] [default: false]
  --prod, -p       Make a production build            [boolean] [default: false]
  --serve, -v      Serve the app                       [boolean] [default: true]
  --specs, -s      Run specs                           [boolean] [default: true]
  --target, -t     Deployment target                                    [string]
  --notify, -n     System or in-browser notifications. Defaults to "system". Use
                   "browser" for browserSync notifications. Use "off" for no
                   notification.                    [string] [default: "system"]

Examples:
  gulp                                      Run with fake data with $httpBackend
  gulp --backend                            Run with real data from an api. See
                                            config.coffee for proxy
                                            configuraton.
  gulp --prod --no-serve                    Make a production build on a CI
                                            server without running the web
                                            server.
  npm test                                  Run Karma and Protractor tests
                                            during a CI build.
  gulp --injectcss                          Use Browsersync to inject CSS
                                            http://www.browsersync.io/docs/gulp/
                                            #gulp-sass-css.
  npm run deploy [-- --target location |    Deploy to a target.
  s3]

If you find an issue, feel free to file it at
https://github.com/CaryLandholt/fatarrow/issues

[19:33:23] Finished 'help' after 12 ms
[19:33:23] Finished 'clean:working' after 37 ms
[19:33:23] Starting 'normalizeComponents'...
[19:33:23] Finished 'normalizeComponents' after 22 ms
[19:33:23] Starting 'prepare'...
[19:33:23] Finished 'prepare' after 4.34 μs
[19:33:23] Starting 'javaScript'...
[19:33:24] Starting 'babel'...
[19:33:24] Finished 'babel' after 14 ms
[19:33:24] Starting 'coffeeScript'...
[19:33:24] Starting 'liveScript'...
[19:33:24] Starting 'typeScript'...
[19:33:24] Starting 'css'...
[19:33:24] Starting 'copy:less'...
[19:33:24] Starting 'sass'...
[19:33:24] Starting 'html'...
[19:33:24] Starting 'haml'...
[19:33:24] Starting 'jade'...
[19:33:25] Starting 'markdown'...
[19:33:25] Starting 'fontTypes'...
[19:33:25] Starting 'imageTypes'...
[19:33:25] Finished 'fontTypes' after 49 ms
[19:33:25] Starting 'fonts'...
[19:33:25] Finished 'css' after 293 ms
[19:33:25] Finished 'haml' after 276 ms
[19:33:25] Finished 'liveScript' after 479 ms
[19:33:25] Finished 'typeScript' after 440 ms
[19:33:25] Finished 'sass' after 289 ms
[19:33:25] Finished 'jade' after 254 ms
[19:33:25] Finished 'markdown' after 59 ms
[19:33:25] Finished 'javaScript' after 1.22 s
[19:33:25] Finished 'fonts' after 24 ms
[19:33:25] Finished 'imageTypes' after 119 ms
[19:33:25] Starting 'images'...
[19:33:25] Finished 'copy:less' after 386 ms
[19:33:25] Starting 'less'...
[19:33:25] Finished 'html' after 483 ms
[19:33:25] Starting 'views'...
[19:33:25] Finished 'images' after 170 ms
[19:33:25] Finished 'less' after 188 ms
[19:33:25] Starting 'styles'...
[19:33:25] Finished 'styles' after 120 ms
[19:33:25] Finished 'views' after 211 ms
[19:33:25] Finished 'coffeeScript' after 1.44 s
[19:33:25] Starting 'scripts'...
[19:33:25] Finished 'scripts' after 48 ms
[19:33:25] Starting 'spa'...
[19:33:25] Finished 'spa' after 4.16 ms
[19:33:25] Starting 'build'...
[19:33:26] Finished 'build' after 80 ms
[19:33:26] Starting 'server'...
[19:33:26] Finished 'server' after 37 ms
[19:33:26] Starting 'watch'...
[19:33:26] Finished 'watch' after 122 ms
[19:33:26] Starting 'test'...
[19:33:26] Starting 'karma'...
[19:33:26] Finished 'karma' after 138 ms
[19:33:26] Finished 'test' after 138 ms
[19:33:26] Starting 'default'...
[19:33:26] Finished 'default' after 2.5 μs
WARN [watcher]: Pattern "/Users/matt/Projects/exploratory/fatarrow/dist/**/angular.min.js" does not match any file.
WARN [watcher]: Pattern "/Users/matt/Projects/exploratory/fatarrow/dist/**/angular-animate.min.js" does not match any file.
WARN [watcher]: Pattern "/Users/matt/Projects/exploratory/fatarrow/dist/**/angular-mocks.js" does not match any file.
WARN [watcher]: Pattern "/Users/matt/Projects/exploratory/fatarrow/dist/**/angular-route.min.js" does not match any file.
WARN [watcher]: Pattern "/Users/matt/Projects/exploratory/fatarrow/dist/**/loading-bar.min.js" does not match any file.
[BS] Access URLs:
 ------------------------------------
       Local: http://localhost:8181
    External: http://192.168.1.8:8181
 ------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.1.8:3001
 ------------------------------------
[BS] Serving files from: dist/
PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR
  ReferenceError: Can't find variable: angular
  at /Users/matt/Projects/exploratory/fatarrow/dist/app/app.js:9

PhantomJS 1.9.8 (Mac OS X 0.0.0): Executed 0 of 0 ERROR (0.034 secs / 0 secs)
matt328 commented 8 years ago

It seems like 'bower install' is putting bower_components under 'app' in the root of the project. This looks a little suspicious because of the 'Can't find variable: angular' since none of the bower components are present in my 'dist' folder.

Edit: It looks like the .bowerrc file was removed sometime after the tag v1.8.0 was created. Replacing it fixed my issue.

Looks like it was deleted in this commit: 347d912441d166464689831937c0b14880256432. The message doesn't mention anything about it so maybe it was a mistake?

nmehta6 commented 8 years ago

@matt328 I did not see any need for .bowerrc since I thought "directory": "bower_components" was the default for bower. But, it looks like it is necessary. I am able to build and run without it and the CI Travis build is passing without it as well. So, I don't know why it is breaking on your machine. Do you have more information about this?

matt328 commented 8 years ago

I did some more research, and it turns out I had a rogue .bowerrc in a parent directory containing "directory": "app/bower_components".

Sorry about that, I didn't realize until researching it just now that bower recursively search parent directories up to and including /.

nmehta6 commented 8 years ago

Good to hear things are working for you now.