Skip to content

Instantly share code, notes, and snippets.

@sentientwaffle
Created November 11, 2011 01:46
Show Gist options
  • Save sentientwaffle/1356903 to your computer and use it in GitHub Desktop.
Save sentientwaffle/1356903 to your computer and use it in GitHub Desktop.
Trouble w/ browserify and fileify
# ...
browserify = require 'browserify'
fileify = require 'fileify'
# Set up the browserify client bundle.
bundle = browserify
watch: true
bundle.use fileify("templates", "#{__dirname}/../../client/site/projects")
# Error on this line
bundle.addEntry "./client/site-main.coffee"
# ...
app.use bundle
Error: Cannot find module "templates" from directory "/home/x/code/stratus-js/client/site/projects"
at Function.<anonymous> (/home/x/local/lib/node_modules/browserify/lib/wrap.js:333:19)
at Function.require (/home/x/local/lib/node_modules/browserify/index.js:151:28)
at /home/x/local/lib/node_modules/browserify/lib/wrap.js:411:14
at Array.forEach (native)
at Function.<anonymous> (/home/x/local/lib/node_modules/browserify/lib/wrap.js:410:27)
at Function.require (/home/x/local/lib/node_modules/browserify/index.js:151:28)
at /home/x/local/lib/node_modules/browserify/lib/wrap.js:137:14
at Array.forEach (native)
at Function.<anonymous> (/home/x/local/lib/node_modules/browserify/lib/wrap.js:135:22)
at Function.addEntry (/home/x/local/lib/node_modules/browserify/index.js:151:28)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment