patch-package 6.4.7 (the same error in last version too)
I tried create patch for "@ngrx/component-store": "12.5.1", i just changed 3 files:
1) node_modules\@ngrx\component-store\fesm2015\ngrx-component-store.js
this.isInitialized = true;
initState(state) {
scheduled([state], queueScheduler).subscribe((s) => {
this.stateSubject$.next(s);
});
}
next i tried remove folder node_modules\@ngrx\ and runned npm got output:
Compiling @ngrx/component-store : main as umd
patch-package 6.4.7
Applying patches...
@ngrx/router-store@11.1.1 ā
d3-drag@3.0.0 ā
d3-zoom@3.0.0 ā
devextreme@19.2.12 ā
ERROR Failed to apply patch for package @ngrx/component-store at path
node_modules/@ngrx/component-store
This error was caused because patch-package cannot apply the following patch file:
patches/@ngrx+component-store+12.5.1.patch
Try removing node_modules and trying again. If that doesn't work, maybe there was
an accidental change made to the patch file? Try recreating it by manually
editing the appropriate files and running:
patch-package @ngrx/component-store
If that doesn't work, then it's a bug in patch-package, so please submit a bug
report. Thanks!
patch-package 6.4.7 (the same error in last version too) I tried create patch for "@ngrx/component-store": "12.5.1", i just changed 3 files: 1) node_modules\@ngrx\component-store\fesm2015\ngrx-component-store.js this.isInitialized = true; initState(state) { scheduled([state], queueScheduler).subscribe((s) => { this.stateSubject$.next(s); }); }
2) node_modules\@ngrx\component-store\esm2015\src\component-store.js initState(state) { this.isInitialized = true; scheduled([state], queueScheduler).subscribe((s) => { this.stateSubject$.next(s); }); }
3) node_modules\@ngrx\component-store\bundles\ngrx-component-store.umd.js ComponentStore.prototype.initState = function (state) { var _this = this; _this.isInitialized = true; rxjs.scheduled([state], rxjs.queueScheduler).subscribe(function (s) { _this.stateSubject$.next(s); }); };
=> i got patch like ...\patches\@ngrx+component-store+12.5.1.patch with code:
diff --git a/node_modules/@ngrx/component-store/bundles/ngrx-component-store.umd.js b/node_modules/@ngrx/component-store/bundles/ngrx-component-store.umd.js index 9ba56cc..79b4d12 100644 --- a/node_modules/@ngrx/component-store/bundles/ngrx-component-store.umd.js +++ b/node_modules/@ngrx/component-store/bundles/ngrx-component-store.umd.js @@ -1,8 +1,8 @@ (function (global, factory) { .....
next i tried remove folder node_modules\@ngrx\ and runned npm got output:
Compiling @ngrx/component-store : main as umd patch-package 6.4.7 Applying patches... @ngrx/router-store@11.1.1 ā d3-drag@3.0.0 ā d3-zoom@3.0.0 ā devextreme@19.2.12 ā
ERROR Failed to apply patch for package @ngrx/component-store at path
This error was caused because patch-package cannot apply the following patch file:
Try removing node_modules and trying again. If that doesn't work, maybe there was an accidental change made to the patch file? Try recreating it by manually editing the appropriate files and running:
If that doesn't work, then it's a bug in patch-package, so please submit a bug report. Thanks!
patch-package finished with 1 error(s).