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

663
Views
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 answers
Answer question

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 Report

0

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

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