NPM, package.json, best practice recommendation

#1

Hi!

I want to play with some ECMAScript programs available in NPM (I don’t know the exact terminology, let me list node.js, package.json, etc).

What is the best way to do this in NixOS? I distrust NPM so that’s why I am trying to use NixOS as a clean environment to protect myself.

Cheers,
Yasu

0 Likes

#2

:eyes: found this link http://nicknovitski.com/nix-npm-install

idk if that is the best way …

see also : https://github.com/svanderburg/node2nix

0 Likes

#3

Thank you, well, I am not quite familiar with NixOS anyway, so let me start with Haskell + NixOS. Hopefully, Haskell is “mainstream” in NixOS so I will get more insights into how to use Nix packaging systems when other people use other managers such as stack.

0 Likes

#4

Then I will get more insights into how to use Nix instead of NPM?

0 Likes

#5

There is npm2nix and yarn2nix. You create package.json and then use one of these to generate nix expression.

0 Likes

#6

Let me know if you’re still hung up on this. I got ECMAScript set up a few weeks back for some WebGL stuff. I’d be happy to help but don’t want to do a whole write-up if you’ve already resolved this. :upside_down_face:

0 Likes