I've got a simple coffee script web server set up:
http = require 'http' express = require 'express' http.createServer (req, res) -> res.writeHead 200 res.end 'Hello, World!' .listen 8888 console.log 'Server running at http://127.0.0.1:8888/'
When I run this, it's fine and serving pages:
~/jsfinder> coffee app.coffee Server running at http://127.0.0.1:8888/
OK no problems there. But when I try the same with nodemon I get:
~/jsfinder> nodemon app.coffee 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.<anonymous> (/firstname.lastname@example.org:4:21) 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.runMain (module.js:492:10) at process.startup.processNextTick.process._tickCallback (node.js:244:9)
So this is either a bug in nodemon or one of my modules in my npm globals is actually using require.paths. I'm going with the latter. Thing is, I have about 12 modules installed globally, so should I just grep them all and find it that way? Or does that exception stack trace tell me something that I'm not seeing? Does this look like a legit bug in nodemon?
I ran an
npm update -g with no issues this morning, so all my modules should be up to date.
Update: did some grepping in the node modules directory with no results:
/usr/lib/nodejs/npm/node_modules> find . -type f -print0 | xargs -0 grep require.paths /usr/lib/nodejs/npm/node_modules> cd .. /usr/lib/nodejs/npm> find . -type f -print0 | xargs -0 grep require.paths /usr/lib/nodejs/npm> cd .. /usr/lib/nodejs> find . -type f -print0 | xargs -0 grep require.paths ./module.js: throw new Error('require.paths is removed. Use ' +
~/jsfinder> find . -type f -print0 | xargs -0 grep require.paths ~/jsfinder>
So that's telling me that no module in globals or locals is using require.paths. Confusing.
I would go with the former and would be willing to bet that the error is in
I don't think your update command worked, since
nodemon should be
There is currently no discussion for this recipe.
This recipe can be found in it's original form on Stack Over Flow.