cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Data Engineering
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

ipywidgets: Uncaught RefferenceError require is not defined

NCat
New Contributor III

Hi,

When I tried to use ipywidgets, it returns the following error.

CA0045C4-83C6-46FC-95DC-6857199FE69D.jpeg

Iā€™m using Databricks with PrivateLink enabled on AWS, and Runtime version is 12.2 LTS.

Is there something that I need to use ipywidgets in my environment?

5 REPLIES 5

Kaniz
Community Manager
Community Manager

Hi @NCatThe error message "uncaught reference error: require is not defined" indicates that the require function is not defined in the current scope. This error can occur when using Databricks Connect with a version of Node.js that does not support the require function. 

To resolve this issue, you can try the following steps:

  1. Make sure that you are using a version of Node.js that is supported by Databricks Connect. According to the information provided, the only supported versions for Databricks Connect are 12.2 LTS ML, 12.2 LTS, 11.3 LTS ML, 11.3 LTS, 10.4 LTS ML, 10.4 LTS, 9.1 LTS ML, 9.1 LTS, and 7.3 LTS.
  2. Check that you have installed the required packages and dependencies for your version of Databricks Connect. The Databricks Connect major and minor package versions must always match your version. Databricks recommends always using the most recent package of Databricks Connect that matches your version.
  3. For example, when you use a 12.2 LTS cluster, you must also use the databricks-connect==12.2.* package.
  4. Ensure you have installed the Java Runtime Environment (JRE) 8, as this is required for Databricks Connect. The client has been tested with the OpenJDK 8 JRE. The client does not support Java 11.

Sources:
https://docs.databricks.com/dev-tools/databricks-connect-legacy.html#requirements
https://docs.databricks.com/dev-tools/databricks-connect-legacy.html#install-databricks-connect

NCat
New Contributor III

Thank you for your reply @Kaniz .

I donā€™t use Databricks Connect. Iā€™m using default Notebook Editor on Databricks instead.

Is there any possible reason for the error?

Kaniz
Community Manager
Community Manager

Hi @NCat, Based on the provided information, I can see no maintenance updates or new features related to the Notebook Editor on Databricks for the given Runtime version and PrivateLink configuration.

However, there are some updates related to PrivateLink and the E2 version of the platform that might be relevant:-

AWS PrivateLink for workspaces (Public Preview) was released on April 20, 2021, which allows the provisioning secure private workspaces by creating VPC endpoints to both the front-end and back-end interfaces of the infrastructure.

The workspace must be on the E2 version of the platform.

For detailed setup instructions, see the documentation at https://docs.databricks.com/administration-guide/cloud-configurations/aws/aws-privatelink.html.
- You can update running workspaces with new configurations for credentials (AWS IAM cross-account roles) and network using the account console or the Account API. The workspace must be on the E2 version of the platform. For more information, see the documentation at https://docs.databricks.com/administration-guide/cloud-configurations/aws/update-workspace-credentia....

If you have any specific questions or issues related to the Notebook Editor or your PrivateLink configuration, please provide more details, and I will try my best to assist you.

NCat
New Contributor III

Thank you for your support.

The Back-end in the PrivateLink has limited access to the public internet with a white list.

Does it have to have access to a certain website to use ipywidgets?

NCat
New Contributor III

@Kaniz 

I guess ipywidgets on Databricks uses CDN, and it cannot be loaded in PrivateLink environment. Isnā€™t this the cause of the error?

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.