首页 > 解决方案 > 输出路径为运行 ng add nguniversal/express-engine 时服务器目标不是字符串错误

问题描述

我通过运行@nguniversal/express-engine 得到这个错误,但首先我得到了一个未处理的异常:找不到模块'@schematics/angular/utility/workspace' 错误我通过运行 npm install -D @angular/cli 解决了这个问题走了,但现在我得到了这个错误 我的NG版本

我尝试重新安装@nguniversal/express-engine 但没有帮助

我的 angular.json

"build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "outputPath": "dist/CodingBlogs",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "tsconfig.app.json",
            "aot": true,
            "assets": [
              "src/favicon.ico",
              "src/assets"
            ],

标签: angulartypescript

解决方案


推荐阅读