akdubya / dustjs

Asynchronous templates for the browser and node.js
http://akdubya.github.com/dustjs/
MIT License
1.44k stars 131 forks source link

require.paths not supported for Node.js 0.6.13 #59

Closed corentinway closed 12 years ago

corentinway commented 12 years ago

Hi all,

I try to run dust.js in a node.js script. I meet the following issue (see stack trace bellow)

It seems the "require.path" statment is no more supported. And you use it in your file server.js

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH envi
ronment variable instead.
    at Function.<anonymous> (module.js:378:11)
    at Object.<anonymous> (C:\workspace\node.js\my_project\tools\node_modules\dust\
lib\server.js:6:8)
    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 Module.require (module.js:354:17)
    at require (module.js:370:17)
    at Object.<anonymous> (C:\workspace\node.js\my_project\tools\node_modules\dust\
lib\dust.js:511:7)
    at Module._compile (module.js:441:26)

Thank you.

corentinway commented 12 years ago

have a look at this fork and this file particulary: https://github.com/semanticprogrammer/dustjs/blob/master/lib/server.js