Unable to run build verison for Custom palatte

I am using bpmn 7.3.0 and tried creating a custom palette using custom-modeler in a create-react-app App provided at https://github.com/bpmn-io/bpmn-js-examples/tree/custom-elements-properties-panel/custom-elements/app/custom-modeler
However, I get the following error when I build my app -
Error: No provider for “palette”! (Resolving: paletteProvider -> palette)

This is the code snippet from Custom-Palette

import Modeler from "bpmn-js/lib/Modeler";

import { assign, isArray } from "min-dash";

import inherits from "inherits";

import CustomModule from "./custom-palette";

interface CustomModeler {
	_customElements: Array<any>;

const CustomModeler = function (this: any, options: any) {
	Modeler.call(this, options);
	this._customElements = [];
} as any as { new (options: any): CustomModeler;};

export default CustomModeler;

inherits(CustomModeler, Modeler);

CustomModeler.prototype._modules = [CustomModeler.prototype._modules, CustomModule];

For further assistance, please share a CodeSandbox that reproduces your issue in a way that we can inspect it.