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

30
Views
Error [ERR_REQUIRE_ESM] ES module require() is not supported

Developed a Shopify Remix app prior to template migration to Vite. There is a library @shopify/polaris-viz that I am using for graphics. However, it was constantly throwing the ERR_REQUIRE_ESM string-width error when trying to run the project. It was later fixed using serverDependenciesToBundle as suggested here . However, I'm now having trouble migrating this to the Vite implementation. Since remix.config.ts no longer exists what should be the best way to handle the following error?

 require() of ES Module /app/node_modules/d3-scale/src/index.js from /app/node_modules/@shopify/polaris-viz-core/build/cjs/utilities/createGradient.js not supported.
Instead change the require of index.js in /app/node_modules/@shopify/polaris-viz-core/build/cjs/utilities/createGradient.js to a dynamic import() which is available in all CommonJS modules.

Looking at threads 7872 and 7865 in the official remix repository doesn't seem to be working. As suggested in 7865, I put the wrong package, in this case d3-scale in ssr -> noExternal but this doesn't seem to be working.

 ssr: {
 noExternal: ["d3-scale"]
}

Steps to reproduce the issue:

  1. Set up a new project

  2. Add @shopify/polaris-viz to the project

  3. import { PolarisVizProvider } from "@shopify/polaris-viz";

Any help with this is greatly appreciated.

over 2 years ago · Carlos Garzón Colorado
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!