Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

34
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda