Closed onichandame closed 2 years ago
when the deps are hosted and installed to an upper directory like this:
~/.config/coc/extensions └──node_modules └──coc-sh └──bash-language-server
In this case the pkgDir resolves to the wrong path: ~/.config/coc/extensions/node_modules/coc-sh/node_modules/bash-language-server.
pkgDir
~/.config/coc/extensions/node_modules/coc-sh/node_modules/bash-language-server
require.resolve uses the native dependency loader require to find the path to the dependencies.
require.resolve
require
Problem
when the deps are hosted and installed to an upper directory like this:
In this case the
pkgDir
resolves to the wrong path:~/.config/coc/extensions/node_modules/coc-sh/node_modules/bash-language-server
.Solution
require.resolve
uses the native dependency loaderrequire
to find the path to the dependencies.