Integrating cheerio in react or vue

Is it possible to run cheerio in a react or vue Website? Background: i need people to tell me how many pages their website has. Therefore i wanted to provide a little app that counts pages of given domain. To prevent abuse i wanted to run it client-side in vue3 and not provide a node server myself:
import HelloWorld from './components/HelloWorld.vue'
import { CheerioCrawler } from 'crawlee';
import HelloWorld from './components/HelloWorld.vue'
import { CheerioCrawler } from 'crawlee';
throws following error:
index.ts:13 Uncaught TypeError: import_async_hooks.AsyncLocalStorage is not a constructor
at node_modules/@apify/timeout/index.js (index.ts:13:24)
at __require2 (chunk-Y7S7B2N7.js?v=0da08c16:19:50)
at node_modules/@crawlee/core/autoscaling/autoscaled_pool.js (autoscaled_pool.ts:2:1)
at __require2 (chunk-Y7S7B2N7.js?v=0da08c16:19:50)
at node_modules/@crawlee/core/autoscaling/index.js (index.ts:1:1)
at __require2 (chunk-Y7S7B2N7.js?v=0da08c16:19:50)
at node_modules/@crawlee/core/index.js (index.ts:2:1)
at __require2 (chunk-Y7S7B2N7.js?v=0da08c16:19:50)
at node_modules/crawlee/index.js (index.ts:1:1)
at __require2 (chunk-Y7S7B2N7.js?v=0da08c16:19:50)
index.ts:13 Uncaught TypeError: import_async_hooks.AsyncLocalStorage is not a constructor
at node_modules/@apify/timeout/index.js (index.ts:13:24)
at __require2 (chunk-Y7S7B2N7.js?v=0da08c16:19:50)
at node_modules/@crawlee/core/autoscaling/autoscaled_pool.js (autoscaled_pool.ts:2:1)
at __require2 (chunk-Y7S7B2N7.js?v=0da08c16:19:50)
at node_modules/@crawlee/core/autoscaling/index.js (index.ts:1:1)
at __require2 (chunk-Y7S7B2N7.js?v=0da08c16:19:50)
at node_modules/@crawlee/core/index.js (index.ts:2:1)
at __require2 (chunk-Y7S7B2N7.js?v=0da08c16:19:50)
at node_modules/crawlee/index.js (index.ts:1:1)
at __require2 (chunk-Y7S7B2N7.js?v=0da08c16:19:50)
Is it even possible to integrate cheerio in vue, react or angular?
1 Reply
curly-silver
curly-silver2y ago
I guess, it's not possible as Crawlee runs in node.js env

Did you find this page helpful?