...
Creating binaries in /nix/store/mf3mihgd2mizk237p7ngh5swn5qfviq6-terser-webpack-plugin-1.1.0-nodejs-8.12.0/bin
bin_name: terser-webpack-plugin
bin_abs_path: /nix/store/mf3mihgd2mizk237p7ngh5swn5qfviq6-terser-webpack-plugin-1.1.0-nodejs-8.12.0/lib/node_modules/terser-webpack-plugin
Traceback (most recent call last):
File "/nix/store/zd4zda85991mrwaw8q53g1dxy3rrg24y-node-build-tools/bin/install-binaries", line 59, in <module>
with open(bin_abs_path) as f:
IOError: [Errno 21] Is a directory: u'/nix/store/mf3mihgd2mizk237p7ngh5swn5qfviq6-terser-webpack-plugin-1.1.0-nodejs-8.12.0/lib/node_modules/terser-webpack-plugin'
...
The bin_name: ... and bin_abs_path: ... lines are due to the following local changes:
diff --git a/nix/nix-node-packages/nodeLib/tools/install-binaries b/nix/nix-node-packages/nodeLib/tools/install-binaries
index 12de49b1..aec19510 100755
--- a/nix/nix-node-packages/nodeLib/tools/install-binaries
+++ b/nix/nix-node-packages/nodeLib/tools/install-binaries
@@ -44,11 +44,13 @@ print("Creating binaries in {}".format(bin_folder))
for bin_name, bin_path in _bin.items():
bin_name = (bin_name or "").strip()
+ print("bin_name: {}".format(bin_name))
if bin_name == "":
sys.exit("Blank binary name for package {}".format(pname))
# Get the absolute path of the script being pointed to.
bin_abs_path = normpath(join(out_dir, "lib", "node_modules",
package["name"], bin_path))
+ print("bin_abs_path: {}".format(bin_abs_path))
if not exists(bin_abs_path):
sys.exit("Package {} version {} declares a binary {} at path {}, "
"but there is no such file at that path.".format(
Here's some output from a package that builds correctly, for comparison:
...
Creating binaries in /nix/store/r4pv9vvrr6b18ymwmbcqm6hbhm1709ka-webpack-cli-3.1.2-nodejs-8.12.0/bin
bin_name: webpack-cli
bin_abs_path: /nix/store/r4pv9vvrr6b18ymwmbcqm6hbhm1709ka-webpack-cli-3.1.2-nodejs-8.12.0/lib/node_modules/webpack-cli/bin/cli.js
...
The package.json says "bin": "", at https://github.com/webpack-contrib/terser-webpack-plugin/blob/v1.1.0/package.json#L10
It seems as if the checks here are insufficient:
|
for bin_name, bin_path in _bin.items(): |
|
bin_name = (bin_name or "").strip() |
|
if bin_name == "": |
|
sys.exit("Blank binary name for package {}".format(pname)) |
|
# Get the absolute path of the script being pointed to. |
|
bin_abs_path = normpath(join(out_dir, "lib", "node_modules", |
|
package["name"], bin_path)) |
|
if not exists(bin_abs_path): |
|
sys.exit("Package {} version {} declares a binary {} at path {}, " |
|
"but there is no such file at that path.".format( |
|
package["name"], package["version"], bin_name, bin_path)) |
The
bin_name: ...andbin_abs_path: ...lines are due to the following local changes:Here's some output from a package that builds correctly, for comparison:
The
package.jsonsays"bin": "",at https://github.com/webpack-contrib/terser-webpack-plugin/blob/v1.1.0/package.json#L10It seems as if the checks here are insufficient:
nix-node-packages/nodeLib/tools/install-binaries
Lines 45 to 55 in aacedf2