Failed to start server: [Errno 2] No such file or directory: ‘tern‘

According to "Using Vim to Build a JavaScript Development Environment"
https://spacevim.org/cn/use-vim-as-a-javascript-ide/,
it still reports an error after finishing.

Error message

Failed to start server: [Errno 2] No such file or directory: ‘tern’
Insert picture description here

Solution

npm -g install tern

The execution is as follows:

$ npm -g install tern              [14:46:49]
/usr/local/bin/tern -> /usr/local/lib/node_modules/tern/bin/tern
+ [email protected]
added 30 packages from 125 contributors in 12.826s

reference

https://github.com/ternjs/tern_for_vim/issues/203

Guess you like

Origin blog.csdn.net/lxyoucan/article/details/114695510