emulsify-ds / emulsify-cli

Command line interface for Emulsify
GNU General Public License v2.0
4 stars 4 forks source link

[BUG] Cannot install the Emulsify UI Kit with the CLI #233

Closed amazingrando closed 6 months ago

amazingrando commented 1 year ago

Describe the bug I'm trying to install the Emulsify UI Kit component library with the Emulsify CLI and I cannot.

To Reproduce Steps to reproduce the behavior:

  1. Go to the Standalone installation instructions
  2. Change the following emulsify system install --repository https://github.com/emulsify-ds/compound.git --checkout [branch/tag/commit] to emulsify system install --repository https://github.com/emulsify-ds/emulsify-ui-kit.git --checkout main
  3. Get the error Unable to install system assets and/or required components: Error: ENOENT: no such file or directory, lstat '/Users/oest/.emulsify/cache/systems/aafceee31da1cd49aa7dc52ebb708c40/compound/src/components/00-base/01-colors'

I updated system.emulsify.json using the instructions in the docs.

Any help would be appreciated. TY.

joetower commented 8 months ago

@mikeethedude and @amazingrando I looked into this and followed Randy's steps to reproduce.

I had a different error message:

emulsify system install --repository https://github.com/emulsify-ds/emulsify-ui-kit.git --checkout main
System configuration errors: [
  {
    keyword: 'required',
    dataPath: '/variants/0',
    schemaPath: '#/properties/variants/items/anyOf/0/required',
    params: { missingProperty: 'components' },
    message: "should have required property 'components'"
  },
  {
    keyword: 'anyOf',
    dataPath: '/variants/0',
    schemaPath: '#/properties/variants/items/anyOf',
    params: {},
    message: 'should match some schema in anyOf'
  }
]

 ERROR  The system install failed due to the validation errors reported above. Please fix the the errors in the "uikit" configuration and try again.

I'm hoping you have ideas as to how to fix this, Mike.

mikeethedude commented 8 months ago

Ah. I think I do actually. Going to look at this soon this week here.

mikeethedude commented 8 months ago

So the error you are getting @joetower is because https://github.com/emulsify-ds/emulsify-ui-kit/blob/main/system.emulsify.json doesn't contain a "components" key inside of the variants object. (See: https://github.com/emulsify-ds/emulsify-cli/blob/develop/src/handlers/systemInstall.ts#L229C40-L229C40) Should we make it so UI Kit provides some info on required components or at at try an empty set of components? Or I can make it so we check if we have components and then skip the whole thing when it isn't setup. (Might be preferred @amazingrando ?)

mikeethedude commented 6 months ago

@amazingrando This would fix this problem from the UI kit side. https://github.com/emulsify-ds/emulsify-ui-kit/pull/115

amazingrando commented 6 months ago

Resolved by #115