node-backbone-skeleton icon indicating copy to clipboard operation
node-backbone-skeleton copied to clipboard

Glob doesn't work

Open reduxdj opened this issue 12 years ago • 3 comments

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

that fixes problem

reduxdj avatar Mar 10 '12 23:03 reduxdj

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.

brikis98 avatar Mar 11 '12 08:03 brikis98

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$

reduxdj avatar Mar 13 '12 13:03 reduxdj

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)

wpoosanguansit avatar Nov 15 '12 19:11 wpoosanguansit