taiko
taiko copied to clipboard
Use npm cache to store Chromium browser to avoid redownloading it
Sometimes we all remove node_modules
folder for some reason. Also, NPM v6 removes it automatically while using npm ci
command.
It is comfortable when libraries which downloads huge dependencies like Chromium or, for example, node-sass bindings are store these dependencies in npm-cache
folder on local user machine to avoid redownload them from Internet every time when node_modules
folder was removed in project.
You can find example how you can do it in node-sass library source code on Github: https://github.com/sass/node-sass/blob/ee13eb9c62449d1e535189a063cbdd15583ebf32/scripts/install.js#L56-L115.
@believer-ufa You can also install taiko globally on your local machine through npm install -g taiko
. So even if you delete the node_modules
folder you do not have to download the browsers again.
Additionally you can also install your browser via package manager and set the environment variable to tell taiko where to find it.
I think it's TAIKO_BROWSER_PATH
(or something like that -- check the docs).