Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/empjustine/nodejs-flake
npm and yarn versions that respect your environment provided node.
https://github.com/empjustine/nodejs-flake
nix-flake nixlang npm npmjs yarn
Last synced: about 2 months ago
JSON representation
npm and yarn versions that respect your environment provided node.
- Host: GitHub
- URL: https://github.com/empjustine/nodejs-flake
- Owner: empjustine
- Created: 2023-11-20T00:25:15.000Z (about 1 year ago)
- Default Branch: v2
- Last Pushed: 2023-12-04T05:19:44.000Z (about 1 year ago)
- Last Synced: 2024-10-19T12:06:32.067Z (3 months ago)
- Topics: nix-flake, nixlang, npm, npmjs, yarn
- Language: Nix
- Homepage:
- Size: 11.2 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nodejs-flake
`npm`, `yarn` and `pnpm` versions that respect your environment provided `node`.
Assuming:
* You have a `/usr/bin/env`;
* You want a nix flake package of `npm`, `yarn` or `pnpm`;
* You want a fixed, specific version of `npm`, `yarn` or `pnpm`, that is not the one bundled in your `nodejs` package;
* You want that the fixed version of `npm`, `yarn` or `pnpm` to use the same `node` that you have on your `$PATH` environment;
* You somehow locked your `node` somewhere else:
* nix flakes;
* jetpack-io/devbox;
* volta;
* pnpm;This might fit your bill.
## Usage
Pick your `npm`/`yarn`/`pnpm` version. Because of limitations on `nixpkgs pname`s, `period`s and the `at sign` are underlines.
# let's assume you need [email protected]
# [email protected] -> npm-9.9.2 -> npm-9_9_2# probably a terrible idea:
nix --extra-experimental-features 'nix-command flakes' profile install 'github:empjustine/nodejs-flake/v2#npm-9_9_2'# a better idea
devbox add 'github:empjustine/nodejs-flake/v2#npm-9_9_2'