ModusCreateOrg / ngbp-gulp

A modified version of the ngBoilerplate that replaces Grunt with gulp, and uses the Angular Material library instead of Boostrap.
9 stars 7 forks source link

Not working per instructions #1

Open stan229 opened 9 years ago

stan229 commented 9 years ago

After doing the basic install steps (npm install and bower install) then running gulp I get the following:

Stans-MBP:html stan229$ gulp
[00:14:34] Using gulpfile ~/Workspaces/asset-tracker/server/html/gulpfile.js
[00:14:34] Starting 'default'...
[00:14:34] Starting 'build'...
[00:14:34] Starting 'clean'...
[00:14:34] Finished 'clean' after 3 ms
[00:14:34] Starting 'sass'...
[00:14:34] Finished 'build' after 13 ms
[00:14:34] Starting 'watch'...
[00:14:34] Finished 'watch' after 13 ms
[00:14:34] Starting 'server'...
[00:14:34] HTTP server listening on port 1337
[00:14:34] Finished 'server' after 3.26 ms
[00:14:34] Starting 'livereload'...
[00:14:34] Finished 'livereload' after 1.45 ms
[00:14:34] Finished 'default' after 32 ms
[00:14:34] Live reload server listening on: 35729
[00:14:34] Finished 'sass' after 43 ms
[00:14:34] Starting 'html2js'...
[00:14:34] Finished 'html2js' after 56 ms
[00:14:34] Starting 'copy'...
[00:14:34] Finished 'copy' after 39 ms
[00:14:34] Starting 'ngAnnotate'...
[00:14:34] Finished 'ngAnnotate' after 25 ms
[00:14:34] Starting 'test'...
INFO [karma]: Karma v0.12.31 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
WARN [watcher]: Pattern "/Users/stan229/Workspaces/asset-tracker/server/html/vendor/angular/angular.js" does not match any file.
WARN [watcher]: Pattern "/Users/stan229/Workspaces/asset-tracker/server/html/vendor/angular-mocks/angular-mocks.js" does not match any file.
WARN [watcher]: Pattern "/Users/stan229/Workspaces/asset-tracker/server/html/vendor/angular-aria/angular-aria.js" does not match any file.
WARN [watcher]: Pattern "/Users/stan229/Workspaces/asset-tracker/server/html/vendor/angular-animate/angular-animate.js" does not match any file.
WARN [watcher]: Pattern "/Users/stan229/Workspaces/asset-tracker/server/html/vendor/angular-ui-router/release/angular-ui-router.js" does not match any file.
WARN [watcher]: Pattern "/Users/stan229/Workspaces/asset-tracker/server/html/vendor/hammerjs/hammer.js" does not match any file.
WARN [watcher]: Pattern "/Users/stan229/Workspaces/asset-tracker/server/html/vendor/angular-material/angular-material.js" does not match any file.
INFO [PhantomJS 1.9.8 (Mac OS X)]: Connected on socket 2gx9izpZmzkOZEVgaXsd with id 51739307
PhantomJS 1.9.8 (Mac OS X) ERROR
  ReferenceError: Can't find variable: angular
  at /Users/stan229/Workspaces/asset-tracker/server/html/src/app/about/about.js:20
PhantomJS 1.9.8 (Mac OS X): Executed 0 of 0 ERROR (0.031 secs / 0 secs)
[00:14:36] 'test' errored after 2.01 s
[00:14:36] Error: 1
  at formatError (/usr/local/lib/node_modules/gulp/bin/gulp.js:169:10)
  at Gulp.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:195:15)
  at Gulp.EventEmitter.emit (events.js:117:20)
  at Gulp.Orchestrator._emitTaskDone (/Users/stan229/Workspaces/asset-tracker/server/html/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
  at /Users/stan229/Workspaces/asset-tracker/server/html/node_modules/gulp/node_modules/orchestrator/index.js:275:23
  at finish (/Users/stan229/Workspaces/asset-tracker/server/html/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
  at cb (/Users/stan229/Workspaces/asset-tracker/server/html/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
  at removeAllListeners (/Users/stan229/Workspaces/asset-tracker/server/html/node_modules/karma/lib/server.js:220:7)
  at Server.<anonymous> (/Users/stan229/Workspaces/asset-tracker/server/html/node_modules/karma/lib/server.js:231:9)
  at Server.g (events.js:175:14)
  at Server.EventEmitter.emit (events.js:117:20)
  at net.js:1265:10
  at process._tickCallback (node.js:415:13)

Error running task sequence: { task: 'test',
  message: 'test callback',
  duration: 2.010361495,
  hrDuration: [ 2, 10361495 ],
  err: 1 }
^C

What I noticed is that it put all the bower installed modules in bower_components instead of vendor. After manually renaming the directory to vendor I get the following error:

Stans-MBP:html stan229$ gulp
[00:15:47] Using gulpfile ~/Workspaces/asset-tracker/server/html/gulpfile.js
[00:15:47] Starting 'default'...
[00:15:47] Starting 'build'...
[00:15:47] Starting 'clean'...
[00:15:47] Finished 'clean' after 3.04 ms
[00:15:47] Starting 'sass'...
[00:15:47] Finished 'build' after 13 ms
[00:15:47] Starting 'watch'...
[00:15:47] Finished 'watch' after 14 ms
[00:15:47] Starting 'server'...
[00:15:47] HTTP server listening on port 1337
[00:15:47] Finished 'server' after 3.56 ms
[00:15:47] Starting 'livereload'...
[00:15:47] Finished 'livereload' after 5.36 ms
[00:15:47] Finished 'default' after 38 ms
[00:15:47] Live reload server listening on: 35729
[00:15:47] Plumber found unhandled error:
 Error: ENOENT, open '/Users/stan229/Workspaces/asset-tracker/server/html/build/assets/modus-ngbp-gulp-0.0.1.css'
[00:15:47] 'sass' errored after 51 ms
[00:15:47] Error: ENOENT, open '/Users/stan229/Workspaces/asset-tracker/server/html/build/assets/modus-ngbp-gulp-0.0.1.css'
Error running task sequence: { task: 'sass',
  message: 'sass stream',
  duration: 0.050551669,
  hrDuration: [ 0, 50551669 ],
  err: 
   { [Error: ENOENT, open '/Users/stan229/Workspaces/asset-tracker/server/html/build/assets/modus-ngbp-gulp-0.0.1.css']
     errno: 34,
     code: 'ENOENT',
     path: '/Users/stan229/Workspaces/asset-tracker/server/html/build/assets/modus-ngbp-gulp-0.0.1.css' } }

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: watch ENOENT
    at errnoException (fs.js:1019:11)
    at FSWatcher.start (fs.js:1051:11)
    at Object.fs.watch (fs.js:1076:11)
    at Gaze._watchDir (/Users/stan229/Workspaces/asset-tracker/server/html/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:289:30)
    at /Users/stan229/Workspaces/asset-tracker/server/html/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:358:10
    at iterate (/Users/stan229/Workspaces/asset-tracker/server/html/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:52:5)
    at Object.forEachSeries (/Users/stan229/Workspaces/asset-tracker/server/html/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:66:3)
    at Gaze._initWatched (/Users/stan229/Workspaces/asset-tracker/server/html/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:354:10)
    at Gaze._internalAdd (/Users/stan229/Workspaces/asset-tracker/server/html/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:193:10)
    at /Users/stan229/Workspaces/asset-tracker/server/html/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:400:16

No build directory gets created though.

Any ideas?

stephengfriend commented 9 years ago

@stan229 if you ran bower install from within the cloned repository, it should have installed the dependencies in vendor/. That's what the .bowerrc does.

My install sequence was:

$ npm install -g gulp bower
$ git clone git@github.com:ModusCreateOrg/ngbp-gulp.git
$ cd ngbp-gulp
$ npm install && bower install
$ gulp

and everything worked fine.

I've experienced your second error a couple of times. It's intermittent and I haven't been able to put my finger on it.