close

[Solved] UnhandledPromiseRejectionWarning: TypeError: MessagePort was found in message but not listed in transferList at new Worker

Hello Guys, How are you all? Hope You all Are Fine. Today when I run My angular project by ng serve I Found the following error in Nodejs. UnhandledPromiseRejectionWarning: TypeError: MessagePort was found in message but not listed in transferList at new Worker. So Here I am Explain to you all the possible solutions here.

Without Wasting your time, Lets start This Article to Solve This Error.

How UnhandledPromiseRejectionWarning: TypeError: MessagePort was found in message but not listed in transferList at new Worker Error Occurs ?

Today when I run My angular project by ng serve I Found the following error in Nodejs. UnhandledPromiseRejectionWarning: TypeError: MessagePort was found in message but not listed in transferList at new Worker.

Generating browser application bundles (phase: building)...(node:5312) UnhandledPromiseRejectionWarning: TypeError: MessagePort was found in message but not listed in transferList at new Worker (internal/worker.js:170:17) at SassWorkerImplementation.createWorker (C:\Users\milan\iacademiaApp1\[email protected]\build-angular\src\sass\sass-service.js:96:24) at SassWorkerImplementation.render

How To Solve UnhandledPromiseRejectionWarning: TypeError: MessagePort was found in message but not listed in transferList at new Worker Error ?

Question: How To Solve UnhandledPromiseRejectionWarning: TypeError: MessagePort was found in message but not listed in transferList at new Worker Error ?
Answer: To resolve this error I Found That The latest version of the Angular CLI (12.0.1) does not support Node below version 12.20. So The Permeant solution is to solve this error you just have to Update your version of Node to the latest stable version. You should pick the version marked LTS, which at the time of writing is in the 14.x.x range. Temporary solution But Please note that You should be careful with this workaround, as node-sass is going to be deprecated soon.

Solution 1

After Some Research I Found That The latest version of the Angular CLI (12.0.1) does not support Node below version 12.20.

So The Permeant solution is to solve this error you just have to Update your version of Node to the latest stable version. You should pick the version marked LTS, which at the time of writing is in the 14.x.x range.

Temporary solution But Please note that You should be careful with this workaround, as node-sass is going to be deprecated soon.

Add node-sass to your project devDependencies until you are able to update your version of node.

npm i -save-dev node-sass
yarn add -D node-sass

Solution 2

Try This Solution Also

  1. ng update @angular/cli
  2. npm install
  3. ng serve

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

Leave a Comment