Open feix760 opened 7 years ago
I suspect that's because the package resolution algo I wrote for Node.vim isn't seeking for modules recursively up the chain. 😇 I should fix that as I occasionally hit that issue myself, too. As for require-relative
, that's a Node module and Node.vim doesn't actually run any of its logic in JavaScript. :)
We can use system('node vim-node.js')
to exe require-relative
for get path, i wrote one at https://github.com/feix760/vim-javascript-gf
I've written a small plugin that uses the package.json to resolve Node Path Relative modules https://github.com/tomarrell/vim-npr and is configurable on a project-by-project basis.
It may help out for your use case.
Many errors:
Can't find file "XXXXXX" in path
We can use require-relative to eaily get real path