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

418
Views
How to solve Webpack error related to compiler after updating webpack, webpack cli and webpack dev server

Good day developers. I´m receiving this error from webpack in my console:

(node:11612) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'compiler' of undefined
    at /Users/.../node_modules/ts-loader/dist/after-compile.js:19:25
    at /Users/.../node_modules/ts-loader/dist/instances.js:203:93
    at Hook.eval [as call] (eval at create (/Users/.../node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:5:1)
    at Hook.CALL_DELEGATE [as _call] (/Users/.../node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14)
    at /Users/.../node_modules/webpack/lib/Compilation.js:3060:40
    at eval (eval at create (/Users/.../node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
    at eval (eval at create (/Users/.../node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at /Users/.../node_modules/webpack/lib/SourceMapDevToolPlugin.js:549:10
    at /Users/.../node_modules/neo-async/async.js:2830:7
    at Object.each (/Users/.../node_modules/neo-async/async.js:2857:9)
(node:11612) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:11612) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

This ocurred after updating my webpack, webpack-cli and webpack-dev-server. Current versions are:


{
 ...
  "devDependencies": {
    ...,
    "prettier": "2.1.2",
    "sass": "1.32.2",
    "sass-loader": "10.1.0",
    "style-loader": "2.0.0",
    "ts-loader": "8.0.11",
    "ts-node": "9.0.0",
    "typescript": "4.0.5",
    "webpack": "5.68.0",
    "webpack-cli": "4.9.2",
    "webpack-dev-server": "4.9.0"
  }
}


after this update i delete my node_module package and the package_lock.json ones, thus after running npm install they were rebuild , but still this error persists.

Could someone give me an idea about why this error? Thanks in advance!!

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