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

332
Views
Cannot read property 'Tag' of undefined. from domhandler in react.js app

I have a react.js project, which indirectly uses domhandler v4.2.0 via cheerio.

Its worked fine for months and then suddenly, my project has started throwing this error when I try to build it.

Tag exists within domelementtype package...and I haven't touched these at all, because they are child dependencies of the main packages I imported originally.

C:\product-app\node_modules\domhandler\lib\node.js:32
    [domelementtype_1.ElementType.Tag, 1],
                                  ^

TypeError: Cannot read property 'Tag' of undefined
    at Object.<anonymous> (C:\product-app\node_modules\domhandler\lib\node.js:32:35)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (C:\product-app\node_modules\domhandler\lib\index.js:15:14)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)

Any ideas what might be causing it?

I'm running node.js 12.16.1 with typescript 3.9.10. The project was originally built on create-react-app and I haven't changed anything, so something in my local environment must have changed to cause this.

I have tried:

  • clearing the node_modules (rimraf)
  • clearing npm cache (inc --force)
  • wiping out my local git repo and pulling a fresh
  • changing node versions
  • installing typescript globally
  • rebooting
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

I had this problem, I deleted package-lock.json (and yarn lock if you have it) and node modules and then ran "npm install" in my terminal.

over 4 years ago · Santiago Trujillo Report

0

Try to use 1.0.0-rc.3. There was some breaking changes between that version and the latest.

over 4 years ago · Santiago Trujillo Report
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!