Когда я пытаюсь установить Angular Universal с помощью следующей команды, я получаю сообщения об ошибках:
Используемая команда:
ng add @ng-toolkit/universal
Ошибка:
Invalid regular expression flags
C:\Users\nnnn\Downloads\ccc\ngseo\node_modules\@ng-
toolkit\universal\schematics.js:199
tree.overwrite(`/${options.serverFileName}`,
test_1.getFileContent(tree,
`/${options.serverFileName}`).replace(/\/\/ Start up the Node
server.*/gs, '').replace('const app = express();', 'export const
app = express();'));
^
SyntaxError: Invalid regular expression flags
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at new ExportStringRef
(C:\Users\nnnn\Downloads\ccc\ngseo\node_modules\@angular-
devkit\schematics\tools\export-ref.js:18:25)
at NodeModulesEngineHost._resolveReferenceString
(C:\Users\nnnn\Downloads\ccc\ngseo\node_modules\@angular-
devkit\schematics\tools\node-module-engine-host.js:94:21)
at NodeModulesEngineHost.createSchematicDescription
(C:\Users\nnnn\Downloads\ccc\ngseo\node_modules\@angular-
devkit\schematics\tools\file-system-engine-host-base.js:172:34)
at SchematicEngine.createSchematic
(C:\Users\nnnn\Downloads\ccc\ngseo\node_modules\@angular-
devkit\schematics\src\engine\engine.js:219:38)
at CollectionImpl.createSchematic
(C:\Users\nnnn\Downloads\ccc\ngseo\node_modules\@angular-
devkit\schematics\src\engine\engine.js:69:29)
at AddCommand.getSchematic
(C: \ Users \ nnnn \ Downloads \ ccc \ ngseo \ node_modules @ angular \ cli \ models \ schematic-command.js: 130: 27) в AddCommand.runSchematic (C: \ Users \ nnnn \ Downloads \ ccc \ ngseo \ node_modules @angular \ cli \ models \ schematic-command.js: 262: 32)
У вас есть идеи, как решить эту проблему?