hyper
hyper copied to clipboard
bug: `yarn` will remove `hyper-nano` binary and `__hyper__` directory on `yarn install`
Background
Right now, npx hyper-nano
will download the hyper nano binary to the node_modules/hyper-nano/bin
directory, and add the __hyper__
directory in the same place, for running services.
Problem
When yarn
is ran, this removes the binary as well as the __hyper__
directory, effectively deleting all of the local data. This isn't a great DX for local development
Solution
I will probably need to download the binary to a cache folder outside of node_modules
ie. how Cypress downloads its binary
For the __hyper__
folder, we can either also store in the global cache, or place it at the root of the project, similar to how next
does it. Right now, hyper-nano
just uses the cwd
to place the __hyper__
directory, so we will have to add a config option for that.
Workaround
Downloading the binary directly from s3
, placing it where you'd like it, and then running it directly, instead of via npx
, will get around this issue, until a solution is implemented.
As part of downloading the binary i'll need to also verify the integrity as highlighted in #534. I have a close to working solution for that, just have to tidy it up.