Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use npm cache to store Chromium browser to avoid redownloading it #2664

Open
believer-ufa opened this issue Nov 30, 2022 · 2 comments
Open

Comments

@believer-ufa
Copy link

believer-ufa commented Nov 30, 2022

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.

@ghost
Copy link

ghost commented Dec 10, 2022

@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.

@marques-work
Copy link
Contributor

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants