Skip to content

xhr-sync-worker.js module error #692

@nikoewe

Description

@nikoewe

When trying to use the crawlee package inside RunJS, I get the following error:

The vm module of Node.js is deprecated in the renderer process and will be removed.
Error: Cannot find module './xhr-sync-worker.js'
Require stack:
- /Applications/RunJS.app/Contents/Resources/app.asar/preview.html

The same code runs without problems in a normal Node.js environment.

Steps to Reproduce
1. Install crawlee
2. Run the following snippet in RunJS:

import { downloadListOfUrls } from 'crawlee';

const result = await downloadListOfUrls({ url: 'https://example.com/sitemap.xml' });
console.log(result);
  1. Observe the error above.

Expected Behavior

Crawlee should be able to run inside RunJS, just as it does in a normal Node.js environment.
Is this a packaging issue (missing file in app.asar), or is RunJS not intended to support modules that rely on workers/XHR APIs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions