Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

Initializing a project

Updated on May 27, 2022

Set up an environment to work with Cosmos digital experience (DX) components.

Before you begin:
  • Ensure that you have authentication to access the resources in the Pega Infinity Server to list, publish, or delete components. For more information, see Authenticating Pega Infinity Server user access.
  • Before you initialize a project, ensure that you have the following software installed:

    • Pega Platform version 8.7 or later
    • Git version 2.30 or later
    • System node version 16
    • System npm version 7
  1. Open your preferred terminal tool.
  2. Enter npx @pega/custom-dx-components@1 init.
    Note: If you encounter an error, set your npm Registry to point to the npm public registry by following the procedure below:
    1. Check which registry your npm Registry currently points to by running the npm config get registry command.
    2. Point your npm Registry to the npm public registry ( by running the npm config set registry command.
    3. Run the npx @pega/custom-dx-components@1 init command again.
  3. If prompted, enter y to install the Custom UI Components package.
  4. Set up the project:
    1. Enter the name of the project.
      For example: mycustomcomponents
    2. Enter the name of the organization.
      The organization name forms the first part of the component.

      For example: customorg

      Note: This parameter governs publishing to NPM or a Git repository. It is not tied to the Org rule.
    3. Enter the version number.
      For example: 1.0.0
    4. To describe the project, enter a description.
      For example: This project is intended to create and publish a custom component.
    5. To publish the component to a Git repository, enter the Git repository URL.
      For example:
    6. To name the project owner, enter an author name.
      For example: Michelle
  5. Check for vulnerabilities by running the npm audit command.
    This will let you know if any vulnerabilities are present.
  6. Remove any vulnerabilities by running the npm audit fix command.
    This will check if new versions of Pega or dependent npms are available, which might fix some or all vulnerabilities.
    Note: Since this application is built using open source components, vulnerabilities may occur. While you can regularly check for vulnerabilities by running the npm audit command, note that some vulnerabilities might not be fixed by running the npm audit fix command till the open source components are updated.
Result: The environment is now set up to work with custom components.
Note: In case of errors, delete the folder of the failed component and perform the procedure again.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us