6

Message&trace:

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\shail\iacademiaApp1\node_modules\@angular-devkit\build-angular\src\sass\sass-service.js:96:24)
    at SassWorkerImplementation.render (C:\Users\shail\iacademiaApp1\node_modules\@angular-devkit\build-angular\src\sass\sass-service.js:62:40)
    at Object.loader (C:\Users\shail\iacademiaApp1\node_modules\sass-loader\dist\index.js:46:3)
(node:5312) 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:5312) [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.
(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\shail\iacademiaApp1\node_modules\@angular-devkit\build-angular\src\sass\sass-service.js:96:24)
    at SassWorkerImplementation.render (C:\Users\shail\iacademiaApp1\node_modules\@angular-devkit\build-angular\src\sass\sass-service.js:62:40)
    at Object.loader (C:\Users\shail\iacademiaApp1\node_modules\sass-loader\dist\index.js:46:3)
(node:5312) 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: 2)
/ Generating browser application bundles (phase: building)...
1
  • Explain your scenario properly.
    – Pal Singh
    Commented May 20, 2021 at 8:46

2 Answers 2

13

The latest version of the Angular CLI (12.0.1) does not support Node below version 12.20.

Solution

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.

Workaround

Only do this if you for some reason are completely unable to update your Node version

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

You should be careful with this workaround, as node-sass is going to be deprecated soon.

1
  • In my case this isn't working, I'm currently using node 14.17.0 LTS and I'm experiencing the same error.
    – BruneX
    Commented Jun 4, 2021 at 17:10
2

Please try this:

ng update @angular/cli

npm install

Not the answer you're looking for? Browse other questions tagged or ask your own question.