UI custom component deploys successfully to instance, but is not visible when selected in UI Builder

carlose
Tera Contributor

Versions used

node Version: v12.16.1

npm Version: 6.14.5

snc version 1.1.0

ui-component version 21.0.7

 

Introduction

We have tested in 3 diferente instances all in the SanDiego realease:

  • Instance Alpha - SanDiego - Personal Developer Instance - Patch: patch1-03-02-2022 - Not working
  • Instance Beta - SanDiego - Partner Instance - Patch: patch1-hotfix1b-05-02-2022- Not working
  • Instance Gamma - SanDiego - Partner Instance - Patch: patch1-hotfix1b-05-02-2022- Works fine

When we deploy a custom component into the SNOW instances we obtain a successful response from the deployment CLI command, the component is available in the component selector menu (after clearing the cache). Still, whenever we add it to a page, we get an error on the component when opening the page, and the component is never shown in the page or in the UI Builder preview/workspace. The only place we are able to deploy the component with no issue is in the Gamma instance.

We were able to deploy in the other two instances, and the component is showing up, the problem is that we had to use the @devsnc component name prefix when creating the component instead of the @CompanyCode prefix, but we don't think this is a viable workaround.

Does anyone know what might be causing us not to get the component fully working 2 in the 3 tested instances?

 

Summary

  • Successful deployment message displays in the terminal when deployed.
  • It shows up in the component list but does not appear when used.
  • Gives error g.(Failed to load: @Beta/hello-world/index at /uxasset/externals/@Beta/hello-world/index.jsdb)

find_real_file.png

find_real_file.png

  • Tried with different names for the component such as the following but none worked
    @volteoedge/hello-world
    b. @volteo-edge/hello-world
    c. @veus2/hello-world
    d. @Beta/hello-world
  • veus2 is our appcreator.company.code and that didn’t work as well
  • We get the error on the 2 of the 3 instances they are all on the same version, and we followed the same deployment steps, all of the deployments were done with the same node, npm & CLI versions, and we are able to deploy on the Gamma(renamed: volteoedge) instance with no workaround or issue.

find_real_file.png

  • We are able to make it work in Beta when we use the @devsnccomponent name prefix e.g.(@devsnc/workaround-hello-world), but we believe this is not good practice.

find_real_file.png

find_real_file.png

For a deeper understanding of the problem please read the Steps Followed

 

Steps Followed

  1. Created the custom components project in the following way:
  • snc ui-component project --name @Alpha/hello-world --description 'Hello World deployment test component'
  • snc ui-component project --name @Beta/hello-world --description 'Hello World deployment test component'
  • snc ui-component project --name @Gamma/hello-world --description 'Hello World deployment test component'
  1. We installed the corresponding dependencies.
  • npm install
  1. Tested all the scenarios locally and they worked fine, displayed the correct message "Hello World", using the following command.
  • snc ui-component develop --open
  1. Deployed the custom components to the instances.
  • snc ui-component deploy --force -p Alpha
  • snc ui-component deploy --force -p Beta
  • snc ui-component deploy --force -p Gamma
  1. We got success messages for all scenarios.
  • Deployment to '\https://Alpha.service-now.com/' was successful.
  • Deployment to '\https://Beta.service-now.com/' was successful.
  • Deployment to '\https://Gamma.service-now.com/' was successful.
  1. We Cleared the cache from the instance, refreshed the UI Builder, and checked the existence of the new UI Builder Component in the Component Selection menu, it existed in all scenarios.
  2. Choose the new component and add it to the page.
  • Alpha - Does NOT show up in the UI Builder & does NOT show on the actual page either.
  • Beta - Does NOT show up in the UI Builder & does NOT show on the actual page either.
  • Gamma - This shows up in the UI Builder and in the actual page.

Other similar articles

Custom Component fails to deploy

1 REPLY 1

Travis Woods
Tera Expert

Hey Carlose,

 

Did you ever resolve this issue? I am having a similar problem in Rome.