-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Method to skip installing Chromium #244
Comments
You can install puppeteer with |
That's fine for messing with this repo itself. However, what about when people are requiring puppeteer in their projects and they have scripts they need to run after install to get things setup? |
If you try hard enough you can make it work. I don't think we should do much to encourage this. Right now Puppeteer is very tied to the version of Chromium it is bundled with. At the moment even a version from a few days earlier will be unusable. |
@Garbee was it a problem with phantomjs-prebuilt? There's a way we can make this work. Currently, puppeteer uses its package folder to keep chromium revision. If instead we use a shared directory, e.g. Today's puppeteer is too young of a project, we'd rather not do this unless there are real use cases and a strong demand. |
Ideally, I think we'd check for the environment on install. Then if a given variable exists and is the right value, don't pull the local version. Instead use the defined chromium path. Then in the system when calling chromium, you always use the path if this is set as well. Skip downloadif (process.env.PUPPETEER_PREVENT_INTERNAL_CHROMIUM === 'yes') {
console.log('Not installing internal Chromium. Expecting binary to be located at $CHROMIUM_PATH');
process.exit(0);
} Nothing with phantomjs stuff. I just noticed this is going to happen on every pull. It's thinking ahead to when we release and more projects are using it, there will inevitably loads of extra disk space used. I understand that right now it is very much a bleeding edge thing and Chromium needs to keep getting updated. But at this stage, that's also acceptable. The issue was more focusing on a long-term issue so we can start assessing proper resolution strategies. |
Maybe it is worth to use one environment variable (like |
@vsemozhetbyt It's good idea, If |
@brutalcrozt there's already a way to skip Chromium download with |
@aslushnikov what is the value for the PUPPETEER_SKIP_CHROMIUM_DOWNLOAD? do I need to set up in PATH variable? |
@shmdhussain you can set it to anything. It just needs to be defined in |
Thanks ...I updated the same as you mentioned in bash.profile...now working good without installing chromium....testing screenshot comparison of element based on the example from Monica dinculescu |
That is what i did |
As of v1.7.0 the recommended way to get Puppeteer without downloading Chromium instance is |
I have a question: what If my puppeteer script only works 100% on its own chromium instance? I've tried with local chrome, local chromium, but at some point, doing hard work, the script brokes, not finding some classes on page. |
Does any one knows a way to disable But still |
use |
I have a helper (TypeScript) Library, which depends on Is it possible to modify my Lib to work with both |
@lockevn That's a question for whomever maintains that typescript library. It should be possible though as they'd just need to do and "or" against the types. But, afaik the typescript library isn't maintained here. |
can't puppeteer just be smart enough to look in By the time we forget to --ignore-scripts, it's already too late..puppeteer has to do this for it's users. |
The solution provided
This solution worked for me. |
You can install puppeteer run this ''npm install --ignore-scripts puppeteer'' your cmd. |
Problem
As it is, every Puppeteer install will pull its own internal Chromium copy. Whether or not it is actually used. This can end up using a lot of extra space, at 92Mb per copy currently, on peoples drives. Primarily locally where you may have multiple projects all using the tool.
Action
There should be some mechanism for skipping this download when installing dependencies if you intend to use an already existing copy of Chrome/Chromium.
The text was updated successfully, but these errors were encountered: