-
Notifications
You must be signed in to change notification settings - Fork 100
Description
I'm comparing node2nix 1.11.0 to node2nix 1.9.0.
In the 1.9.0 version. The result of a simple JS application with a bin executable looks like this:
./result
├── bin -> lib/node_modules/.bin
└── lib
└── node_modules
├── .bin
│ └── dosomething -> ../somerandompackage/src/bin/dosomething.js
└── somerandompackage
├── default.nix
├── .gitignore
├── nix
│ └── leveldown.patch
├── package.json
├── .package.json.un~
├── package-lock.json
├── pkgs.nix
├── release.nix
├── shell.nix
├── src
│ └── bin
│ ├── dosomething.js
│ ├── .dosomething.js.un~
│ └── .dosomething.ts.un~
├── tsconfig.build.json
├── tsconfig.json
├── utils.nix
├── .utils.nix.swp
└── .utils.nix.un~
8 directories, 18 files
Note the ./result/bin -> ./result/lib/node_modules/.bin symlink AND also the ./result/lib/node_modules/.bin directory containing the executable symlink dosomething.
With the exact same repository, using node2nix 1.11.0 (the master commit of this repository), the output is now:
./result
└── lib
└── node_modules
└── somerandompackage
├── default.nix
├── .gitignore
├── nix
│ └── leveldown.patch
├── package.json
├── .package.json.un~
├── package-lock.json
├── pkgs.nix
├── release.nix
├── shell.nix
├── src
│ └── bin
│ ├── dosomething.js
│ ├── .dosomething.js.un~
│ └── .dosomething.ts.un~
├── tsconfig.build.json
├── tsconfig.json
├── utils.nix
├── .utils.nix.swp
└── .utils.nix.un~
6 directories, 17 files
Notice how both the bin symlink is not there. Nor is the .bin directory under ./result/lib/node_modules.
I believe the bin symlink is only created if the ./result/lib/node_modules/.bin directory gets created.
However it appears the new way of using npm install (and npm has gone from 6.14.13 to 8.5.0), does not appear to create the .bin directory at all.
This means using node2nix on any JS application that has bin executables no longer builds.