Navigation Menu

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

Error: require.paths is removed. #43

Open
jrwats opened this issue Jun 8, 2012 · 9 comments
Open

Error: require.paths is removed. #43

jrwats opened this issue Jun 8, 2012 · 9 comments

Comments

@jrwats
Copy link

jrwats commented Jun 8, 2012

When running most of the JS files in doctorjs, they yield the following error. 'make serve' for instance:
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.

@g1ra
Copy link

g1ra commented Jun 14, 2012

I have the same issue

Executed command: "'/usr/local/bin/jsctags' -f - '/home/bob/www/ss/s.js'"
Command output:
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 environment variable instead.
at Function. (module.js:378:11)
at Object. (/usr/local/bin/jsctags:41:8)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:32)
at Function._load (module.js:308:12)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:41)

@torgeir
Copy link

torgeir commented Jun 15, 2012

+1

@vheon
Copy link

vheon commented Jun 15, 2012

I know it sound silly but: have you set the NODE_PATH variable?

@g1ra
Copy link

g1ra commented Jun 15, 2012

yes i have this in profile

mesg n

export NODE_PATH=/usr/local/lib/jsctags/:$NODE_PATH

@rocksolidwebdesign
Copy link

this is also a problem for me as well

it appears that this script is not compatible with node.js 0.6.x

http://stackoverflow.com/questions/8384840/node-path-error-with-node-js-while-attempting-to-setup-jsctags-for-vim

any word on progress with this?

@tskardal
Copy link

tskardal commented Nov 6, 2012

+1. Is there a workaround?

@mlusetti
Copy link

+1
This issue make doctorjs completely unusable.

@stffrdhrn
Copy link

It seems node.js removed support for require.paths, as explained in the error method. I was able to solve this by removing the offending "require.paths" line. Then my NODE_PATH (and the path set for 'make serve' in Makefile) should be set to $PREFIX/lib/jsctags/, so the program can find paperboy and the other jstag libs.

I should create a proper pull request but, I dont have access to git from work.

File : serve.js ~line: 39

-require.paths.unshift('./lib/jsctags');
var http = require('http'), paperboy = require('paperboy');

@scottjames
Copy link

I still get this error, after fixing my environment NODE_PATH and running from my command line:

/home/scottj/Downloads/doctorjs/serve.js:51
resp.close();
^
TypeError: Object # has no method 'close'
at /home/scottj/Downloads/doctorjs/serve.js:51:9
at /usr/local/lib/jsctags/paperboy.js:125:13
at Object.oncomplete (fs.js:107:15)

scottj@dill$ nodejs --version
v0.10.15

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

9 participants