- Package:
- node-addon-api
- Source:
- node-addon-api
- Submitter:
- Jérémy Lal
- Date:
- 2026-06-19 14:33:03 UTC
- Severity:
- normal
While building in sbuild node-sharp (to be uploaded), I saw that error: FileNotFoundError: [Errno 2] No such file or directory: './build/../../../../usr/share/nodejs/node-addon-api/node_addon_api_maybe.target.mk' It's like https://github.com/prebuild/prebuildify-cross/issues/23 In some cases it doesn't fail. In others it does.
This bug appears when using the deprecated way of configuring binding.gyp.
To avoid that, one has to remove the require in dependencies like so:
--- a/src/binding.gyp
+++ b/src/binding.gyp
@@ -91,7 +91,6 @@
'NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS'
],
'dependencies': [
- '<!(node -p "require(\'node-addon-api\').gyp")',
'libvips-cpp-<(vips_version)'
],
'variables': {
Only the include_dir configuration is needed.
Jérémy