Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require.paths usage exception on latest node build (v0.5.3-pre) #55

Closed
izuzak opened this issue Jul 26, 2011 · 2 comments
Closed

require.paths usage exception on latest node build (v0.5.3-pre) #55

izuzak opened this issue Jul 26, 2011 · 2 comments

Comments

@izuzak
Copy link

izuzak commented Jul 26, 2011

Using jake on the latest node build (v0.5.3-pre) causes the following exception:

node.js:195
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
    at Function.<anonymous> (module.js:360:11)
    at Object.<anonymous> (/usr/local/lib/node/.npm/jake/0.1.14/package/bin/cli.js:20:8)
    at Module._compile (module.js:420:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:335:31)
    at Function._load (module.js:294:12)
    at Array.<anonymous> (module.js:479:10)
    at EventEmitter._tickCallback (node.js:187:26)
@ghost
Copy link

ghost commented Aug 6, 2011

Quick fix in cli.js:
Line 20 to 34

// require.paths.push(__dirname + '/../lib');

var args = process.argv.slice(2)
  , lib_path = __dirname + '/../lib/'
  , fs = require('fs')
  , sys = require('sys')
  , jake = require(lib_path + 'jake.js')
  , api = require(lib_path + 'api.js')
  , Program = require(lib_path + 'program.js').Program
  , program = new Program()
  , Loader = require(lib_path + 'loader.js').Loader
  , loader = new Loader()
  , pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json').toString())
  , opts
  , envVars;

mde added a commit that referenced this issue Aug 6, 2011
Fixes issue #55 require.paths usage exception in nodejs v 0.5.3
@mde
Copy link
Contributor

mde commented Jan 4, 2012

No more require.paths manipulation.

@mde mde closed this as completed Jan 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants