brikis98 / node-backbone-skeleton

A skeleton project for creating applications that use node.js server-side, backbone.js client-side, underscore.js templates, CoffeeScript as a JS pre-processor and Compass/SASS as a CSS pre-processor..
84 stars 16 forks source link

Glob doesn't work #2

Open reduxdj opened 12 years ago

reduxdj commented 12 years ago
glob pattern, (err, matches) =>
  return console.log "#{err}" if err
  for match in matches
    @compileTemplate match, 'create', value.out    

that fixes problem

brikis98 commented 12 years ago

What is the error that you see?

FWIW, I've had issues with the glob library and you have to npm install it after every clone.

reduxdj commented 12 years ago

No that doesn't solve the problem.

quadcore-imac:node-backbone-skeleton dj$ npm install glob npm http GET https://registry.npmjs.org/glob npm http 304 https://registry.npmjs.org/glob quadcore-imac:node-backbone-skeleton dj$ node server.js Compiling all templates

node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Object function glob(pattern, options, cb) { if (typeof options === "function") cb = options, options = {} if (!options) options = {}

if (typeof options === "number") { deprecated() return }

var g = new Glob(pattern, options, cb) return g.sync ? g.found : g } has no method 'glob' at Watcher.processTemplatePattern (/Users/dj/skeleton_temp/node-backbone-skeleton/util/watcher.js:140:19) at Watcher.compileTemplates (/Users/dj/skeleton_temp/node-backbone-skeleton/util/watcher.js:123:28) at Object. (/Users/dj/skeleton_temp/node-backbone-skeleton/server.js:11:11) at Object. (/Users/dj/skeleton_temp/node-backbone-skeleton/server.js:35:4) at Module._compile (module.js:441:26) at Object..js (module.js:459:10) at Module.load (module.js:348:31) at Function._load (module.js:308:12) at Array.0 (module.js:479:10) at EventEmitter._tickCallback (node.js:192:40) quadcore-imac:node-backbone-skeleton dj$

wpoosanguansit commented 12 years ago

Hi, you need to get rid of the glob method and do this instead:

line 85

glob pattern, (err, matches) => return console.log "#{err}" if err for match in matches @compileTemplate match, 'create', value.out

This is from glob in node_module:

glob (pattern, options, cb)