enten / udk

Universal Development Kit: Webpack extension which improves universal application development. - THE UDK PROJECT SUPPORT IS CURRENTLY SUSPENDED.
MIT License
29 stars 7 forks source link

normalizeFileReplacements(...).pipe is not a function with Angular 7.2 #8

Closed hebra closed 5 years ago

hebra commented 5 years ago

After upgrading from Angular 7.1.x to the just released 7.2 the build with UDK fails throwing the following exception:

normalizeFileReplacements(...).pipe is not a function
TypeError: normalizeFileReplacements(...).pipe is not a function
    at supportFileReplacement (/Users/heb/devel/my-project/node_modules/udk/angular/lib/udk-builder.js:32:68)
    at MergeMapSubscriber._getBuilderConfig.pipe.operators_1.concatMap [as project] (/Users/heb/devel/my-project/node_modules/udk/angular/lib/udk-builder.js:175:41)
    at MergeMapSubscriber._tryNext (/Users/heb/devel/my-project/node_modules/rxjs/internal/operators/mergeMap.js:69:27)
    at MergeMapSubscriber._next (/Users/heb/devel/my-project/node_modules/rxjs/internal/operators/mergeMap.js:59:18)
    at MergeMapSubscriber.Subscriber.next (/Users/heb/devel/my-project/node_modules/rxjs/internal/Subscriber.js:67:18)
    at MergeMapSubscriber.notifyNext (/Users/heb/devel/my-project/node_modules/rxjs/internal/operators/mergeMap.js:92:26)
    at InnerSubscriber._next (/Users/heb/devel/my-project/node_modules/rxjs/internal/InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (/Users/heb/devel/my-project/node_modules/rxjs/internal/Subscriber.js:67:18)
    at /Users/heb/devel/my-project/node_modules/rxjs/internal/util/subscribeTo.js:17:28
    at Object.subscribeToResult (/Users/heb/devel/my-project/node_modules/rxjs/internal/util/subscribeToResult.js:10:45)
    at MergeMapSubscriber._innerSub (/Users/heb/devel/my-project/node_modules/rxjs/internal/operators/mergeMap.js:82:29)
    at MergeMapSubscriber._tryNext (/Users/heb/devel/my-project/node_modules/rxjs/internal/operators/mergeMap.js:76:14)
    at MergeMapSubscriber._next (/Users/heb/devel/my-project/node_modules/rxjs/internal/operators/mergeMap.js:59:18)
    at MergeMapSubscriber.Subscriber.next (/Users/heb/devel/my-project/node_modules/rxjs/internal/Subscriber.js:67:18)
    at MergeMapSubscriber.notifyNext (/Users/heb/devel/my-project/node_modules/rxjs/internal/operators/mergeMap.js:92:26)
    at InnerSubscriber._next (/Users/heb/devel/my-project/node_modules/rxjs/internal/InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (/Users/heb/devel/my-project/node_modules/rxjs/internal/Subscriber.js:67:18)
    at MapSubscriber._next (/Users/heb/devel/my-project/node_modules/rxjs/internal/operators/map.js:55:26)
    at MapSubscriber.Subscriber.next (/Users/heb/devel/my-project/node_modules/rxjs/internal/Subscriber.js:67:18)
    at MergeMapSubscriber.notifyNext (/Users/heb/devel/my-project/node_modules/rxjs/internal/operators/mergeMap.js:92:26)
    at InnerSubscriber._next (/Users/heb/devel/my-project/node_modules/rxjs/internal/InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (/Users/heb/devel/my-project/node_modules/rxjs/internal/Subscriber.js:67:18)

package.json.txt

enten commented 5 years ago

Thanks for reporting this issue.

The error is due to commit angular-cli/eaad125d which changes normalizeFileReplacements and normalizeAssetPatterns returns type and commit 4f8a5b7a which introduces normalizeOptimization.

We need to refactor udk-builder to be compat with angular 7.2.

I will do that soon.

enten commented 5 years ago

@hebra

I published udk v1.0.1 to support angular-devkit/build-angular v0.12.x.

Can you try npm install udk@1.0.1 and give us a feedback if the issue is resolved?

hebra commented 5 years ago

@enten yes, it is working with 1.0.1 - thanks a lot for the quick issue resolution.

enten commented 5 years ago

@hebra My bad, I don't consider commit 8516d682 which introduces normalizeSourceMaps.

Therefore source map doesn't work with udk v1.0.1.

I published v1.0.2 to fix source map.

Can you update udk to v1.0.2 and tell us if source map works again?

hebra commented 5 years ago

@enten I can confirm that 1.0.2 still works as expected with Angular 7.2

enten commented 5 years ago

@hebra Thanks for your feedback.