Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Dynamics 365 CRM PCF Control Error .. require is not defined

(0) ShareShare
ReportReport
Posted on by

Dear all, 

 

I am trying to build a PCF control based on the below repo 


GitHub - lblod/frontend-embeddable-notule-editor: Frontend for an embeddable variant of the editor.

The usage of this control in any html page has given below 

Edit fiddle - JSFiddle - Code Playground

 

So, in my constructor i have loaded the js files required for this control like below 

    constructor()
    {
        this.loadScript("https://unpkg.com/svgxuse@1.2.6/svgxuse.js", () => {
            // This callback will be executed when the second script is loaded
            // You can continue to chain additional script loading here
        this.initializeControl();
      });
      });
    });
    });

    loadScript(scriptUrl: string, callback: () => void) {
      const scriptElement = document.createElement("script");
      scriptElement.src = scriptUrl;
      scriptElement.onload = callback;
      document.head.appendChild(scriptElement);
  }
 
However, when i try to initialize the control in init method like below i am getting the error require is not defined

     let App = require('frontend-embeddable-notule-editor/app').default.create({
           autoboot: false,
           name: 'frontend-embeddable-notule-editor'
         });
Could you please help me in this control converting to a pcf control
 
 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 87 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

Overall leaderboard