I have a debian package with npm build dependency, e.g, the control file contains the line:
Build-Depends: debhelper (>= 11), npm
Building this package works fine if I have installed nodejs using apt-get, which creates the file /usr/bin/npm. The problem is that on my current system I have installed nodejs using nvm, which installs everything to the home folder and adds the ~.nvm/versions/node/v12.16.1/bin folder to PATH. Now when trying to build the debian package, I get:
dpkg-checkbuilddeps: error: Unmet build dependencies: npm
even though the npm command works when used in the shell. Is there a way to use binaries installed to the home folder to satisfy the build dependencies?