Jump to content

Node.js: Difference between revisions

278 bytes added ,  15 July 2020
m
add links to source docs, use correct inline code syntax
imported>R-k-b
(add a tip to get Node.js binary things running with low investment)
imported>R-k-b
m (add links to source docs, use correct inline code syntax)
Line 116: Line 116:
Some binaries obtained via npm will not work out of the box with NixOS, as they're dynamically linked to things that don't exist in NixOS (for good reason!)
Some binaries obtained via npm will not work out of the box with NixOS, as they're dynamically linked to things that don't exist in NixOS (for good reason!)


They'll typically give some kind of `ENOENT` error.
They'll typically give some kind of <code>ENOENT</code> error.
For example, `npx cypress open` might give an error like:
For example, <code>npx cypress open</code> might give an error like:


<pre>
<pre>
Line 131: Line 131:
</pre>
</pre>


One quick workaround for this is to use `steam-run` to provide a placeholder FHS environment that *should* work; e.g. for the Cypress example above:
One quick workaround for this is [https://nixos.wiki/wiki/Steam#steam-run to use <code>steam-run</code>] to provide a placeholder FHS environment that *should* work; e.g. for the Cypress example above:


<pre>
<pre>
Line 140: Line 140:
-- Cypress opens successfully!
-- Cypress opens successfully!
</pre>
</pre>
(Inspired by [https://discourse.nixos.org/t/how-to-make-nixos-so-easy-that-people-can-be-productive-up-front-without-having-to-first-learn-the-nix-language/5625 this discussion on discourse.nixos.org])


== External Links ==
== External Links ==
Anonymous user