AmadeusITGroup / otter

The Otter project is a highly modular framework whose goal is to provide a common platform to accelerate and facilitate the development of runtime customizable Angular based Web Applications
https://amadeusitgroup.github.io/otter/
BSD 3-Clause "New" or "Revised" License
48 stars 34 forks source link

[Bug]: design-factory dependencies are needed at the root of the workspace #979

Open fpaul-1A opened 8 months ago

fpaul-1A commented 8 months ago

Package name

showcase

Package version

9.4

Reproduction steps

Try to remove the design-factory associated packages from the root package.json (keeping them only in apps/showcase/package.json): "@design-factory/design-factory", "ag-grid-angular", "ag-grid-community", "bootstrap"

Current result

The build of showcase app fails when trying to @use the scss files from these packages

Expected result

The showcase app should build successfully

Additional comments

No response

kpanot commented 7 months ago

The PR #1113 is fixing the SCSS build issue but the removal of the dependency at workspace level is providing this error in server task:

Unchanged output files: 2
Application bundle generation complete. [0.506 seconds]
Reloading client(s)...
Failed to resolve import "@design-factory/design-factory" from ".angular/vite-root/showcase/chunk-S3V3RFK2.js". Does the file exist?
Failed to resolve import "@design-factory/design-factory" from ".angular/vite-root/showcase/chunk-S3V3RFK2.js". Does the file exist? (x2)
1:23:10 PM [vite] Internal server error: Failed to resolve import "@design-factory/design-factory" from ".angular/vite-root/showcase/chunk-S3V3RFK2.js". Does the file exist?
  Plugin: vite:import-analysis
  File: /otter/.angular/vite-root/showcase/chunk-S3V3RFK2.js:3:68
  4713|  import { ChangeDetectionStrategy as ChangeDetectionStrategy5, Component as Component5, forwardRef, Input as Input6, signal, ViewEncapsulation as ViewEncapsulation5 } from "@angular/core";
  4714|  import { FormsModule, NG_VALUE_ACCESSOR } from "@angular/forms";
  4715|  import { CloseInputDatePickerDirective, DfInputIconDirective } from "@design-factory/design-factory";
     |                                                                       ^
  4716|  import { NgbDate, NgbInputDatepicker } from "@ng-bootstrap/ng-bootstrap";
  4717|  import * as i010 from "@angular/core";
      at formatError (file:///otter/.yarn/__virtual__/vite-virtual-6fc7e2660e/0/cache/vite-npm-4.5.0-6fb40946d7-b262ea4880.zip/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:44062:46)
      at TransformContext.error (file:///otter/.yarn/__virtual__/vite-virtual-6fc7e2660e/0/cache/vite-npm-4.5.0-6fb40946d7-b262ea4880.zip/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:44058:19)
      at normalizeUrl (file:///otter/.yarn/__virtual__/vite-virtual-6fc7e2660e/0/cache/vite-npm-4.5.0-6fb40946d7-b262ea4880.zip/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:41844:33)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async file:///otter/.yarn/__virtual__/vite-virtual-6fc7e2660e/0/cache/vite-npm-4.5.0-6fb40946d7-b262ea4880.zip/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:41998:47
      at async Promise.all (index 70)
      at async TransformContext.transform (file:///Uotter/.yarn/__virtual__/vite-virtual-6fc7e2660e/0/cache/vite-npm-4.5.0-6fb40946d7-b262ea4880.zip/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:41914:13)
      at async Object.transform (file:///otter/.yarn/__virtual__/vite-virtual-6fc7e2660e/0/cache/vite-npm-4.5.0-6fb40946d7-b262ea4880.zip/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:44352:30)
      at async loadAndTransform (file:///otter/.yarn/__virtual__/vite-virtual-6fc7e2660e/0/cache/vite-npm-4.5.0-6fb40946d7-b262ea4880.zip/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55026:29)
      at async viteTransformMiddleware (file:///otter/.yarn/__virtual__/vite-virtual-6fc7e2660e/0/cache/vite-npm-4.5.0-6fb40946d7-b262ea4880.zip/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:64430:32)
kpanot commented 6 months ago

Issue should be fixed in @design-factory/design-factory v16