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

362
Views
Importing 'split-type' npm package in Nextjs, Reference Error

I'm trying to use the npm package 'split-type' https://www.npmjs.com/package/split-type within next.js but I'm getting the error ReferenceError: Element is not defined. I've tried dynamic importing but this does not let me use splitType in the way it is documented. I have tried both import { SplitType } from "split-type" and import SplitType from 'split-type'. My Dependencies in package.json

"dependencies": {
    "gsap": "^3.10.4",
    "locomotive-scroll": "^4.1.4",
    "next": "latest",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "split-type": "^0.3.1"
  }

package-lock.json

   "node_modules/split-type": {
      "version": "0.3.1",
      "resolved": "https://registry.npmjs.org/split-type/-/split-type-0.3.1.tgz",
      "integrity": "sha512-GPmSaAMmn9FhpfAypLFnmslx4QFqsW+u4bP47aCphQ+DwAr0ejxoda3XVoI6+CeZeUNlsQC/ftGYq4IojuAkoQ=="
    },
about 4 years ago · Santiago Trujillo
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!