bee-js icon indicating copy to clipboard operation
bee-js copied to clipboard

Building dependencies takes an aeon on slow connections.

Open significance opened this issue 4 years ago • 2 comments

Due to the need to download the chromium container during building deps, development becomes problematic on slow connections.

It would be great to add the option to not have to download the image every time i npm i.

Perhaps there is a workaround? If so, please do let me know!

Screenshot 2021-02-24 at 18 11 21

significance avatar Feb 24 '21 18:02 significance

Hey there! are you talking about the development of bee-js itself? Or with bee-js as a dependency? The problem is that npm install install both dependencies and devDependencies, so if you want to install only dependencies then you can run npm install --only=prod, that said it won't install also your root devDependencies which might be needed for your development. I guess the goal would be here to install devDependencies for your root package and not devDependencies of your dependencies which is something that I don't know how to do.

AuHau avatar Feb 25 '21 07:02 AuHau

Never mind, I did some testing and npm is not so stupid to install devDependencies of dependencies so I guess you are talking about the development of bee-js itself.

Hmm, other people were already exploring this problem with the reinstallation of Chromium with puppeteer, it is possible to avoid it but will require a bit of work.

References:

  • https://github.com/puppeteer/puppeteer/issues/244
  • https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#environment-variables
  • https://github.com/medic/medic-conf-test-harness/commit/7b48148a3966428a8b57a3b578a8ea804a6f170d

AuHau avatar Feb 25 '21 07:02 AuHau