Description
Which package is this bug report for? If unsure which one to select, leave blank
@crawlee/playwright (PlaywrightCrawler)
Issue description
When I run the "Getting started" crawler ("npm start"), I get this obscure error message related to a tool that is deprecated (WMIC) :
my-crawler@0.0.1 start
npm run start:dev
ERROR Memory snapshot failed.
spawn wmic.exe ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
INFO PlaywrightCrawler: Starting the crawler.
node:internal/child_process:286
const err = new ErrnoException(exitCode, syscall);
^
Error: spawn wmic.exe ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn wmic.exe',
path: 'wmic.exe',
spawnargs: [ 'PROCESS', 'GET', 'ProcessId,ParentProcessId,WorkingSetSize,Name' ]
}
Node.js v20.18.0
Code sample
// For more information, see https://crawlee.dev/
import { PlaywrightCrawler } from 'crawlee';
// PlaywrightCrawler crawls the web using a headless
// browser controlled by the Playwright library.
const crawler = new PlaywrightCrawler({
// Use the requestHandler to process each of the crawled pages.
async requestHandler({ request, page, enqueueLinks, log, pushData }) {
const title = await page.title();
log.info(`Title of ${request.loadedUrl} is '${title}'`);
// Save results as JSON to ./storage/datasets/default
await pushData({ title, url: request.loadedUrl });
// Extract links from the current page
// and add them to the crawling queue.
await enqueueLinks();
},
// Comment this option to scrape the full website.
maxRequestsPerCrawl: 20,
// Uncomment this option to see the browser window.
// headless: false,
});
// Add first URL to the queue and start the crawl.
await crawler.run(['https://crawlee.dev']);
Package version
crawlee@3.12.1
Node.js version
v20.18.0
Operating system
Windows 11
Apify platform
- Tick me if you encountered this issue on the Apify platform
I have tested this on the next
release
No response
Other context
No response