我使用Angular 6开发了一个运行良好的应用程序。
我升级到Angular7。整个应用程序被破坏。 恢复该应用程序花了4天。 现在,我可以在开发模式下构建应用程序,并且可以正常工作。
我正在尝试进行生产。 但是,出现以下错误。
请帮助,以便我可以创建生产版本。
问候,帕萨
命令:ng build --prod --aot
输出:
The /Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/src/undefined path in file replacements does not exist.
Error: The /Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/src/undefined pathin file replacements does not exist.
at TapSubscriber.operators_1.tap [as _tapNext] (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/@angular-devkit/build-angular/src/utils/normalize-file-replacements.js:26:19)
at TapSubscriber._next (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/rxjs/internal/operators/tap.js:59:27)
at TapSubscriber.Subscriber.next (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/rxjs/internal/Subscriber.js:67:18)
at SafeSubscriber.__tryOrUnsub (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:209:16)
at SafeSubscriber.next (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:147:22)
at Subscriber._next (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:90:26)
at Subscriber.next (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:67:18)
at Observable.rxjs_1.Observable.obs [as _subscribe] (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node/host.js:241:21)
at Observable._trySubscribe (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Observable.js:44:25)
at Observable.subscribe (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Observable.js:30:22)
at DoOperator.call (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/rxjs/internal/operators/tap.js:32:23)
at Observable.subscribe (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Observable.js:25:22)
at /Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/rxjs/internal/util/subscribeToObservable.js:10:20
at Object.subscribeToResult (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/rxjs/internal/util/subscribeToResult.js:10:45)
at MergeMapSubscriber._innerSub (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/rxjs/internal/operators/mergeMap.js:82:29)
at MergeMapSubscriber._tryNext (/Users/parthamajumdar/Documents/Solutions/Paikari/pConfMan-v1/node_modules/rxjs/internal/operators/mergeMap.js:76:14)
angular.json文件已损坏。 代替
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
我有以下内容:
"fileReplacements": [
{
"replace": "src/undefined",
"with": "src/environments/environment.ts"
}
]