Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
Error runing a script under remix but not alone in nodejs

I'm getting this error running scrape-it into a Remix app with the blues stack, if I run my code isolated works perfect, any ideas?

Here the error

/home/rogant/dev/findcard/node_modules/iterate-object/lib/index.js:28
            if (fn(obj[keys[i]], keys[i], obj) === false) {
                ^
TypeError: $ is not a function
    at /home/rogant/dev/findcard/node_modules/scrape-it-core/lib/index.js:137:30
    at iterateObject (/home/rogant/dev/findcard/node_modules/iterate-object/lib/index.js:28:17)
    at handleDataObj (/home/rogant/dev/findcard/node_modules/scrape-it-core/lib/index.js:119:9)
    at Function.module.exports [as scrapeHTML] (/home/rogant/dev/findcard/node_modules/scrape-it-core/lib/index.js:208:12)
    at Request._callback (/home/rogant/dev/findcard/node_modules/scrape-it/lib/index.js:32:40)
    at Request.self.callback (/home/rogant/dev/findcard/node_modules/request/request.js:185:22)
    at Request.emit (node:events:390:28)
    at Request.<anonymous> (/home/rogant/dev/findcard/node_modules/request/request.js:1154:10)
    at Request.emit (node:events:390:28)
    at PassThrough.<anonymous> (/home/rogant/dev/findcard/node_modules/request/request.js:1076:12)
ERROR: "dev:server" exited with 1.

Here my script

"use strict";

const scrapeIt = require("scrape-it");

export function getDracoCards(query) {
  return scrapeIt(`https://dracostore.co/?s=rune&post_type=product&dgwt_wcas=1`, {
    cards: {
      listItem: "li.product",
        data: {
          name: "h2.woocommerce-loop-product__title",
          foil: {
            selector: ".ast-woo-product-category",
            convert: (cat) => cat.toLowerCase().indexOf('foil') > -1,
          },
          price: {
            selector: ".woocommerce-Price-amount",
            convert: (price) => price.replace('$', '')
          }
      }
    }
  }).then((data) => {
    console.log(data.data.cards)
  })
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!