Custom Component Help

Hey there!

I am trying to make a custom component in Adalo that makes use of a github library for a “when2meet” type of functionality. The problem I am having is that when I am trying to import the library that contains this functionality, it cannot locate the file.

As you can see, all I have changed from the base adalo component install is I have simply added a line (on line 3) to import ScheduleSelector (which represents a file called “ScheduleSelector.js”) from my project library. ScheduleSelector.js is in my adalo component library, however it cannot locate the file - I am getting the following error:

I am even using the exact relative path of the file to locate it, and it cannot. Does Adalo prevent you from importing outside libraries in your custom components, or am I just doing something wrong? (I tried running with both npm and yarn and received the same exact error on both.)

Any help would be appreciated.

Thanks so much.

Hi knuggie! You should import it with path ‘react-schedule-selector’. No need to use the entire relative path.

2 Likes

Hey Daniel!

So I actually tried that at first and it didn’t work (which is why I tried the entire relative path). Luckily, I think I figured it out just a moment ago. I needed to install core-js since the file I was trying to access had a “require()” statement for it to work.

I appreciate the help though!

1 Like

Glad you found out :hugs:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.