ngx-slider icon indicating copy to clipboard operation
ngx-slider copied to clipboard

PostInstall ngcc after upgrading to Angular v12

Open vlautac opened this issue 2 years ago • 1 comments

Hello, I got an error on postinstall "ngcc" using Yarn. This happens after having upgraded the project to Angular v12.

Warning: Unable to fully load /<path_to_node_modules>/@angular-slider/ngx-slider/bundles/angular-slider-ngx-slider.umd.js for source-map flattening: Cannot read property 'replace' of null
Warning: Unable to fully load /<path_to_node_modules>/@angular-slider/ngx-slider/bundles/angular-slider-ngx-slider.umd.js for source-map flattening: Cannot read property 'replace' of null
Error: Error when flattening the source-map "/<path_to_node_modules>/@angular-slider/ngx-slider/bundles/angular-slider-ngx-slider.umd.js.map" for "/<path_to_node_modules>/@angular-slider/ngx-slider/bundles/angular-slider-ngx-slider.umd.js": TypeError: Cannot read property 'rawMap' of null
Error: Error on worker #4: TypeError: Cannot read property '1' of undefined
    at renderFactoryParameters (/<path_to_node_modules>/@angular/compiler-cli/ngcc/src/rendering/umd_rendering_formatter.js:201:51)
    at UmdRenderingFormatter.addImports (/<path_to_node_modules>/@angular/compiler-cli/ngcc/src/rendering/umd_rendering_formatter.js:63:13)
    at Renderer.renderFile (/<path_to_node_modules>/@angular/compiler-cli/ngcc/src/rendering/renderer.js:94:35)
    at /<path_to_node_modules>/@angular/compiler-cli/ngcc/src/rendering/renderer.js:53:108
    at Array.forEach (<anonymous>)
    at Renderer.renderProgram (/<path_to_node_modules>/@angular/compiler-cli/ngcc/src/rendering/renderer.js:48:54)
    at Transformer.transform (/<path_to_node_modules>/@angular/compiler-cli/ngcc/src/packages/transformer.js:88:42)
    at /<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/create_compile_function.js:52:42
    at /<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/worker.js:85:54
    at step (/<path_to_node_modules>/tslib/tslib.js:143:27)
    at ClusterMaster.onWorkerMessage (/<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:195:27)
    at /<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:55:95
    at ClusterMaster.<anonymous> (/<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:293:57)
    at step (/<path_to_node_modules>/tslib/tslib.js:143:27)
    at Object.next (/<path_to_node_modules>/tslib/tslib.js:124:57)
    at /<path_to_node_modules>/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/<path_to_node_modules>/tslib/tslib.js:113:16)
    at EventEmitter.<anonymous> (/<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:287:32)
    at EventEmitter.emit (events.js:223:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
(node:35563) UnhandledPromiseRejectionWarning: Error: write EPIPE                                                                                                                                                                               
    at process.target._send (internal/child_process.js:806:20)
    at process.target.send (internal/child_process.js:676:19)
    at /<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/utils.js:51:21
    at new Promise (<anonymous>)
    at Object.sendMessageToMaster (/<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/utils.js:46:16)
    at /<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/worker.js:104:66
    at step (/<path_to_node_modules>/tslib/tslib.js:143:27)
    at Object.throw (/<path_to_node_modules>/tslib/tslib.js:124:57)
    at rejected (/<path_to_node_modules>/tslib/tslib.js:115:69)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:35563) 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(). (rejection id: 1)
(node:35563) [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:35565) UnhandledPromiseRejectionWarning: Error: write EPIPE
    at process.target._send (internal/child_process.js:806:20)
    at process.target.send (internal/child_process.js:676:19)
    at /<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/utils.js:51:21
    at new Promise (<anonymous>)
    at Object.sendMessageToMaster (/<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/utils.js:46:16)
    at /<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/worker.js:104:66
    at step (/<path_to_node_modules>/tslib/tslib.js:143:27)
    at Object.next (/<path_to_node_modules>/tslib/tslib.js:124:57)
    at /<path_to_node_modules>/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
(node:35565) 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(). (rejection id: 1)
(node:35565) [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:35564) UnhandledPromiseRejectionWarning: Error: write EPIPE
    at process.target._send (internal/child_process.js:806:20)
    at process.target.send (internal/child_process.js:676:19)
    at /<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/utils.js:51:21
    at new Promise (<anonymous>)
    at Object.sendMessageToMaster (/<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/utils.js:46:16)
    at /<path_to_node_modules>/@angular/compiler-cli/ngcc/src/execution/cluster/worker.js:104:66
    at step (/<path_to_node_modules>/tslib/tslib.js:143:27)
    at Object.throw (/<path_to_node_modules>/tslib/tslib.js:124:57)
    at rejected (/<path_to_node_modules>/tslib/tslib.js:115:69)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:35564) 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(). (rejection id: 1)
(node:35564) [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.

Configuration: "@angular-slider/ngx-slider": "^2.0.3", "@angular/animations": "^12.2.11", "@angular/cdk": "^12.2.11", "@angular/compiler": "^12.2.11", "@angular/forms": "^12.2.11", "@angular/material": "^12.2.11", "@angular/platform-browser": "^12.2.11", "@angular/platform-browser-dynamic": "^12.2.11", "@angular/router": "^12.2.11", "tslib": "^2.0.0", "@angular-devkit/architect": "^0.1202.11", "@angular-devkit/build-angular": "~12.2.11", "@angular/cli": "^12.2.11", "@angular/common": "^12.2.11", "@angular/compiler-cli": "^12.2.11", "@angular/core": "^12.2.11", "@angular/language-service": "^12.2.11", "@angular/localize": "^12.2.11",

vlautac avatar Oct 22 '21 18:10 vlautac

@vlautac Also having this issue, were you able to find a workaround for this?

danielnoo avatar Aug 11 '22 13:08 danielnoo

Closing old issues related to old Angular versions. This is not relevant anymore in context of newer supported versions.

piotrdz avatar Feb 15 '24 07:02 piotrdz