Angular 通用安装会引发错误

阿纳米克·阿迪卡里

当我尝试使用以下命令安装 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)

你知道如何解决这个问题吗?

反应性

这是图书馆的一个已知问题。

https://github.com/maciejtreder/ng-toolkit/issues/590

您必须运行支持 JavaScript ES2018 的 NodeJS 版本。

http://2ality.com/2017/07/regexp-dotall-flag.html

将您的 NodeJS 升级到最新的 LTS 版本。

https://nodejs.org/en/

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Angular ngAnimate引发错误

来自分类Dev

打字安装会引发错误

来自分类Dev

在 Linux 中以普通用户身份安装 Hyperledger Fabric 会引发错误

来自分类Dev

简单的Angular组件会引发很多错误

来自分类Dev

每当包含JQuery时,Angular都会引发错误

来自分类Dev

Primeng饼图在Angular2中引发错误

来自分类Dev

指令对指令通信在Angular中引发错误

来自分类Dev

Angular:ng-if不起作用,并引发错误

来自分类Dev

在USB上安装Chromium OS会引发错误

来自分类Dev

如果表单标签上的html'name'属性具有特殊字符,在我的情况下,Angular会引发错误

来自分类Dev

捆绑安装引发错误

来自分类Dev

从文件还原表会引发错误

来自分类Dev

尝试重置导航会引发错误

来自分类Dev

禁用UIButton会引发错误

来自分类Dev

在resolve()引发错误后重定向到模板时,Angular UI Router问题

来自分类Dev

Angular $ compile对非HTML字符串加引号引发错误

来自分类Dev

在Angular模板中,如果未定义变量,是否有引发错误的方法?

来自分类Dev

简单运行Angular2会在es6-promise中引发错误.Promise

来自分类Dev

Angular指令的“ require” DDO选项在应该使用时不会引发错误

来自分类Dev

MatToolbar与Angular 9一起使用时会引发错误

来自分类Dev

在Ionic 5中使用表单,Angular 9引发错误:NodeInjector:NOT_FOUND [ControlContainer]

来自分类Dev

在回调中调用函数会在 Angular 中引发错误

来自分类Dev

安装Raven for Sentry后运行rake:test会引发错误

来自分类Dev

在Windows 10的ubunutu上的bash上安装nvm会引发错误

来自分类Dev

pip安装会引发错误-没有setup.py

来自分类Dev

在Windows 10的ubunutu上的bash上的bash上安装nvm会引发错误

来自分类Dev

将PlaceAutocompleteFragment添加到活动会引发错误

来自分类Dev

为什么此Java转换会引发错误?

来自分类Dev

向Controller注入多个服务会引发错误-AngularJs

Related 相关文章

  1. 1

    Angular ngAnimate引发错误

  2. 2

    打字安装会引发错误

  3. 3

    在 Linux 中以普通用户身份安装 Hyperledger Fabric 会引发错误

  4. 4

    简单的Angular组件会引发很多错误

  5. 5

    每当包含JQuery时,Angular都会引发错误

  6. 6

    Primeng饼图在Angular2中引发错误

  7. 7

    指令对指令通信在Angular中引发错误

  8. 8

    Angular:ng-if不起作用,并引发错误

  9. 9

    在USB上安装Chromium OS会引发错误

  10. 10

    如果表单标签上的html'name'属性具有特殊字符,在我的情况下,Angular会引发错误

  11. 11

    捆绑安装引发错误

  12. 12

    从文件还原表会引发错误

  13. 13

    尝试重置导航会引发错误

  14. 14

    禁用UIButton会引发错误

  15. 15

    在resolve()引发错误后重定向到模板时,Angular UI Router问题

  16. 16

    Angular $ compile对非HTML字符串加引号引发错误

  17. 17

    在Angular模板中,如果未定义变量,是否有引发错误的方法?

  18. 18

    简单运行Angular2会在es6-promise中引发错误.Promise

  19. 19

    Angular指令的“ require” DDO选项在应该使用时不会引发错误

  20. 20

    MatToolbar与Angular 9一起使用时会引发错误

  21. 21

    在Ionic 5中使用表单,Angular 9引发错误:NodeInjector:NOT_FOUND [ControlContainer]

  22. 22

    在回调中调用函数会在 Angular 中引发错误

  23. 23

    安装Raven for Sentry后运行rake:test会引发错误

  24. 24

    在Windows 10的ubunutu上的bash上安装nvm会引发错误

  25. 25

    pip安装会引发错误-没有setup.py

  26. 26

    在Windows 10的ubunutu上的bash上的bash上安装nvm会引发错误

  27. 27

    将PlaceAutocompleteFragment添加到活动会引发错误

  28. 28

    为什么此Java转换会引发错误?

  29. 29

    向Controller注入多个服务会引发错误-AngularJs

热门标签

归档