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

667
Visualizações
Error affecting vercel deployment but not a local build

I keep getting this error when compiling on Vercel or Heroku, but not on my PC.

Module not found: Error: You attempted to import /vercel/path0/node_modules/console-browserify/index.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.

This is an error I get when running npm run build on Vercel, it does not occur on a local build.

I have tried changing the webpack version (it just gives a different error). I have no idea where console-browserify is used (apart from react itself).

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

I had the same problem deploying on Netlify. I'm using https://github.com/Richienb/node-polyfill-webpack-plugin.

All I have to do is to exclude console-browsify

const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")

module.exports = {
    // Other rules...
    plugins: [
        new NodePolyfillPlugin({
            excludeAliases: ["console"]
        })
    ]
}
about 4 years ago · Juan Pablo Isaza Relatório

0

The problem was resolved by just removing all console.log, console.warn, etc. from the program!

about 4 years ago · Juan Pablo Isaza Relatório
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