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 calling tagbar open - cannot find module underscore #39

Closed
AndrewRayCode opened this issue Sep 7, 2011 · 3 comments
Closed

Error calling tagbar open - cannot find module underscore #39

AndrewRayCode opened this issue Sep 7, 2011 · 3 comments

Comments

@AndrewRayCode
Copy link

Error detected while processing function <SNR>27_AutoUpdate..<SNR>27_ProcessFile..        <SNR>27_ExecuteCtagsOnFile:
line   43:
Tagbar: Could not execute ctags for file.js!
Executed command: "'jsctags'  -f -  'file.js'"
Command output:
node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
Error: Cannot find module 'underscore'
    at Function._resolveFilename (module.js:322:11)
    at Function._load (module.js:267:25)
    at require (module.js:351:19)
    at Object.<anonymous> (/usr/local/bin/jsctags:42:9)
    at Module._compile (module.js:407:26)
    at Object..js (module.js:413:10)
    at Module.load (module.js:339:31)
    at Function._load (module.js:298:12)
    at Array.<anonymous> (module.js:426:10)
    at EventEmitter._tickCallback (node.js:126:26)

Note that running jsctags' -f - file.js from the command line works just fine

@AndrewRayCode
Copy link
Author

npm install -g underscore fixed it, but then the next error is 'cannot find module ctags.' I'm sure a -g install for ctags would work too, but I shouldn't have to globally install anything for this to work?

@AndrewRayCode
Copy link
Author

The issue was my fault, need

/usr/local/lib/jsctags/

in your NODE_PATH, for example

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

in your .bashrc

@majutsushi
Copy link
Collaborator

Yes, I was going to say that it sounds like an env variable problem, but good thing you figured it out. I don't really use JavaScript myself so I'm not really familiar with node installation stuff.

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