Reputation: 53
I am trying to integrate Dust with node.js. I am using Express as node.js framework. I created an express project with following command.
express test
npm install -d
Then i installed dust using command
npm install dust
Then i changed my view engine from 'jade' to 'dust' in app.js file. I created two views named as index.dust in my views folder containing the following code:
{<title}Homepage{/title}
{<page_id}index{/page_id}
{<main}
Homepage content goes here
{/main}
now when I run my project using node monitor in following command:
nodemon app.js
it throws me following error:
500 Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
at Function.Module._compile.Object.defineProperty.get (module.js:386:11)
at Object. (C:\testExpress\node_modules\dust\lib\server.js:6:8)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object. (C:\testExpress\node_modules\dust\lib\dust.js:511:7)
at Module._compile (module.js:449:26)
Please help me in resolving it. I am a newbie on node.js, express and dust.
Upvotes: 0
Views: 539
Reputation: 4256
dustjs no longer seems to be maintained. Use the linkedin fork. https://github.com/linkedin/dustjs
Upvotes: 1
Reputation: 15003
This is a known issue with dust; it's written to use a now-abandoned version of node's module system. The issue page shows some people's workarounds.
Upvotes: 0