feat: Initialize project with core dependencies, Vultr API client, customer database service, and migration documentation.
This commit is contained in:
21
not_used/install_browser.js
Normal file
21
not_used/install_browser.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const puppeteer = require('puppeteer');
|
||||
const { BrowserFetcher } = puppeteer;
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
console.log('Installing browser...');
|
||||
const browserFetcher = new BrowserFetcher({ path: './node_modules/puppeteer/.local-chromium' });
|
||||
const revision = '1045629'; // Revision from the error message or a recent stable one
|
||||
const revisionInfo = await browserFetcher.download(revision);
|
||||
console.log(`Browser downloaded to ${revisionInfo.folderPath}`);
|
||||
} catch (e) {
|
||||
console.error('Download failed:', e);
|
||||
// Fallback: try default install
|
||||
try {
|
||||
console.log("Trying default install...");
|
||||
require('child_process').execSync('npm install puppeteer', { stdio: 'inherit' });
|
||||
} catch (err) {
|
||||
console.error("Manual install failed too");
|
||||
}
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user