Joeri Exelmans 507fb3838c Fix build (fallback to Node 14 because for some reason Node2Nix 16 does not install dependencies of dependencies). 3 年之前
..
README.txt 709fd31967 Cleanup repo. Dependencies and (static) build are handled by Nix. 3 年之前
default.nix 507fb3838c Fix build (fallback to Node 14 because for some reason Node2Nix 16 does not install dependencies of dependencies). 3 年之前
node-env.nix ed6a459b35 Fix build (use Node 16 instead of 12 to fetch npm dependencies) 3 年之前
node-packages.nix ed6a459b35 Fix build (use Node 16 instead of 12 to fetch npm dependencies) 3 年之前
package.json ed6a459b35 Fix build (use Node 16 instead of 12 to fetch npm dependencies) 3 年之前

README.txt

This is NOT an actual (valid) NPM package!

The file 'package.json' only serves as a declaration of NPM dependencies, and serves as input to Node2Nix, which outputs a bunch of Nix derivations. These derivations in turn make Nix (instead of 'npm') fetch the NPM dependencies and put them in the Nix store, instead of in a 'node_modules' folder (in-place, yuck!).

After changing 'package.json', simply re-run 'node2nix' in order to update the generated *.nix files.

BTW, even though node2nix generates Nix expressions for a whole lotta things:
- building a package (based on package.json)
- building a distributable tarball
- entering a development shell
- building the dependencies of a package
we ONLY use the Nix expression to do the last option (building the dependencies). Building a package or redistributable tarball just makes no sense (recall that this is NOT an NPM package), and entering a development shell does not seem to work very well (it overwrites our NODE_PATH completely).



If you do not want to use Nix, probably you can run 'npm i' in this directory, which will create a node_modules folder in-place. Then you add the node_modules folder to NODE_PATH environment variable.