criticalmanufacturing / cli

Critical Manufacturing Projects Command Line Tool
https://criticalmanufacturing.github.io/cli/
BSD 3-Clause "New" or "Revised" License
10 stars 22 forks source link

fix(build): install and build lbos package #334

Closed oliveriosousa closed 9 months ago

oliveriosousa commented 10 months ago

Description

This PR fixes the build command when used on HTML package on v10.1.1

After analyses, I noticed that after linking LBO's we still need to get the packages the LBOs depend on.

With this PR, it will install and build the LBO package as well before linking.

Steps to reproduce

Run: cmf build on HTML package with v.10.1.1

  Executing 'ng build Cmf.Custom.HTML'
  - Generating browser application bundles (phase: setup)...
  √ Browser application bundle generation complete.
  √ Browser application bundle generation complete.

  ../Libs/LBOs/TypeScript/esm/cmf-lbos.mjs:1:0-28 - Error: Module not found: Error: Can't resolve 'moment' in 
'C:\agentsWork\SRV-PI-BS01-11\9451\s\Libs\LBOs\TypeScript\esm'

  Error: ../Libs/LBOs/TypeScript/index.d.ts:1:20 - error TS2307: Cannot find module 'moment' or its corresponding type declarations.

  1 import moment from "moment";
                       ~~~~~~~~

  Error: Optimization error [main.6874f47118be7dc5.js]: X [ERROR] Invalid assignment target