模块构建失败

时间:2019-12-07 03:54:05

标签: javascript angular angular-module

我创建了一个新项目,并尝试将另一个项目符号链接,以便可以将其用作库。但是我出错了

ERROR in ../@shabywoks-angular/@shabywoks-angular.module.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /Users/somename/Desktop/somename/@shabywoks-angular/@shabywoks-angular.module.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
    at AngularCompilerPlugin.getCompiledFile (/Users/somename/Desktop/somename/DemoAngularApp/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:869:23)
    at plugin.done.then (/Users/somename/Desktop/somename/DemoAngularApp/node_modules/@ngtools/webpack/src/loader.js:41:31)
    at process._tickCallback (internal/process/next_tick.js:68:7)

我无法弄清楚实际的问题是什么。

我们是否需要配置任何内容以将项目中的另一个模块用作符号链接。

我尝试将其添加到模块文件夹

{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "newProjectRoot": "projects",
  "projects": {
    "@SHABYWOKS-ANGULAR" : {
      "projectType": "application",
      "schematics": {
        "@schematics/angular:component": {
          "style": "scss"
        }
      },
      "root": "",
      "sourceRoot": "",
      "build": {
        "builder": "@angular-devkit/build-angular:browser",
        "options": {
          "preserveSymlinks": true
        }

      },
      "serve": {
        "builder": "@angular-devkit/build-angular:dev-server",
        "options": {
          "browserTarget": "@SHABYWOKS-ANGULAR:build"
        },
        "configurations": {
          "production": {
            "browserTarget": "@SHABYWOKS-ANGULAR:build:production"
          }
        }
      }
    }
  }
}

我正在这样在应用程序文件夹外部添加符号链接

-- src
   -- app
   -- library

0 个答案:

没有答案