Hacker News new | ask | show | jobs
by lenkite 1891 days ago
Admittedly as someone who doesn't code Rust, I have never tried to use cargo to install deno. On macOS I use brew.

brew install deno # works with no issues and much faster

Though, at the bottom of https://deno.land/#installation, one sees the incantation:

cargo install deno --locked

I removed brew's deno, installed rust (via brew) and then tried this. No compile errors. And swc_ecma_transforms compiled successfully.

   ...

   Compiling swc_ecma_transforms_proposal v0.13.1

   Compiling swc_ecma_transforms_optimization v0.15.3

   Compiling swc_ecma_transforms_typescript v0.14.1

   Compiling swc_ecma_transforms_react v0.14.1

   Compiling swc_ecma_transforms v0.45.1

   Compiling gfx-auxil v0.8.0

   ...

   Installing /Users/i034796/.cargo/bin/deno

   Installing /Users/i034796/.cargo/bin/denort

   Installed package `deno v1.9.0` (executables `deno`, `denort`)
1 comments

brew is nice. I have a rule for myself, though, that if I'm picking up something I'm likely to deploy on an environment that's not my mac, I don't use brew to install it. That can make some things harder up front, but I have my eyes open from the start and get fewer surprises between beta and deployment.

On the other hand, having added `--locked` to the cargo invocation, it works for me now too, so apparently (a) I should look into what that means and (b) I should consider using brew for hints even in situations where I don't intend to rely on it. Thanks!

(On the other other hand, even finding the way through this issue reinforces the point about a certain complexity/opacity to tooling that's supposed to make things easier.)