nodejs.ensure only sets up NVM if there isn't a system-wide
installation of Node that matches our NODE_MINIMUM_VERSION.
The ubuntu image in the CI comes with an up to date node version,
so pyright from .nvm_packages is never installed.
This commit fixes this by introducing a package.json file.
Pyright [1] is in the nvm enviroment, may be you need to rebuild the nvm
environment and install nodejs in::
./manage nvm.clean
./manage nvm.nodejs
The last command installs nodejs and the packages from .nvm_packages.
You can test your pyright installation, to get a bash within the nvm run::
./manage nvm.bash
(nvm) $ which pyright
./.nvm/versions/node/v16.13.0/bin/pyright
If you have a local nvm in your HOME folder, the output from ``which`` is
different. Press ``[CTRL-D]`` to get out of this bash.
[1] https://github.com/microsoft/pyright
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
The Node.js installation in the NVM environment can be used by IDEs and other
developer tasks. The required developer packagaes are added to the file
./.nvm_packages and will be installed when Node.js is installed. Initial we
start with:
- eslint
Having a dedicated developer enviroment, provided by nvm makes it easy to
integrate Node.js packages into various IDEs. One example is shown in the
.dir-locals.el which is used by emacs.
[1] https://github.com/nvm-sh/nvm#default-global-packages-from-file-while-installing
[2] https://eslint.org
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>