tern_for_vim: Tern Server fails to start

Whenever I try and run a tern command, I get this:

Failed to start server:
module.js:338
    throw err;
          ^
Error: Cannot find module '/Users/yoaquim.cintron/.vim/bundle/tern_for_vim/node_modules/tern/bin/tern'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Seldom will the server start correctly.

The module is there, I’m assuming, but maybe there’s an issue when loading it?

Any workarounds/fixes to this?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 1
  • Comments: 16 (3 by maintainers)

Most upvoted comments

same problem here. Just need to go to ~/.vim/bundle/tern_for_vim npm install myself

Solved problem with sudo npm install tern