Угловая ошибка AOT & Rollup [!]: Неожиданный токен

Я следую за https://angular.io/guide/aot-compiler учебным пособием, все идет хорошо до раздела накопительного пакета.

Когда я бегу:

"node_modules/.bin/rollup"  -c rollup-config.js

Я получаю эти ошибки:

The following options have been renamed — please update your config: options.entry -> options.input, options.dest -> options.output.file, options.format -> options.output.format

src/main.ts → src/build.js...
The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string
[!] Error: Unexpected token
aot\src\app\app.module.ngfactory.ts (43:57)
41: import * as import32 from './all-holiday-requests/all-holiday-requests.component.ngfactory';
42: import * as import33 from '../../../src/app/app.component';
43: class AppModuleInjector extends import0.ɵNgModuleInjector<import1.AppModule> {
                                                             ^
44:   _NgProbeToken_2:any[];
45:   _ɵg_3:import2.ɵg;

До этого я получал это:

The following options have been renamed — please update your config: options.entry -> options.input, options.dest -> options.output.file, options.format -> options.output.format

src/main.ts → src/build.js...
The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string
[!] Error: Could not resolve '../aot/src/app/app.module.ngfactory' from src\main.ts
Error: Could not resolve '../aot/src/app/app.module.ngfactory' from src\main.ts
    at error (D:\DEV\mdAutocomplete - test\node_modules\rollup\dist\rollup.js:185:14)
    at then.resolvedId (D:\DEV\mdAutocomplete - test\node_modules\rollup\dist\rollup.js:9776:8)

так что я изменился

main.ts

import { AppModuleNgFactory } from '../aot/src/app/app.module.ngfactory';

в

import { AppModuleNgFactory } from '../aot/src/app/app.module.ngfactory.ts';

возможно это было ошибкой Спасибо за любую помощь заранее:)

0 ответов

Другие вопросы по тегам