JavaScript & Debian tips
Take also a look at known patches.
Find and fix missing/broken dependencies
Use this if you're not able to fix the problem.
Example: jest --ci or rollup -c fail.
Install missing modules
install only modules that don't exist in Debian: pkgjs-install and retest command
if command still fails, maybe a dependency version mismatch, then install modules that mismatch Debian version: pkgjs-install --strict and retest
if command still fails, maybe a Debian package is broken, then use a normal install: npm install --ignore-scripts
if command still fails, try to fix the problem, then restart this process
Reduce needed non-Debian dependencies
If you're not able to keep only needed modules in node_modules/ directory, you can use reduce-nodejs from Yadd's tools.
Example: reduce-nodejs jest --ci.
You can launch reduce-nodejs more than one time if you think that some modules are superfluous. At the end of the process, node_modules/ directory contains:
links to the Debian modules that have to be linked into node_modules/ directory
- module that
- doesn't exist in Debian
- mismatch or are broken in Debian
You can use check-nodejs from Yadd's tools to show Debian problems.
And then ?
list needed links to Debian JS modules into debian/nodejs/extlinks
patch your repository (remember to look at known patches) or fix broken Debian packages
- create Debian package for some significant missing modules
- embed little/unimportant modules needed to build/test only:
in debian/build_modules for modules needed to build and maybe test
in debian/tests/test_modules for test-only modules
