Widgets not working

Hi, I am using the visual builder with next js project and trying to use Carousel and other builder widgets in my project but they are currently showing as blank and getting “Missing @builder.io/widgets installation, please install and import @builder.io/widgets to use Accordion in your content” error.

I had tried to install Widgets by adding:

import ‘@builder.io/widgets’; in [[…page].tsx but i still get the same error. What am i doing wrong ? Thanks !

Link to content: https://builder.io/content/db8007e8e7ac4318b1ef7444467ec3fd/edit?activeDesignerTab=3&selectedBlock=builder-30de277d2a2e42fbbd7f8c43069a0bc9

There are lot of errors in Developer console as well. This was not the case few days before.

Please refer to the following screenshot for reference.

Hello @kailash99,

It seems that you’ve successfully imported the widgets library, but the package itself hasn’t been installed yet. To resolve this, please run the following command to ensure that the widgets function properly:

npm install @builder.io/widgets

Hi Thanks for your response, i have installed widgets using npm install @builder.io/widgets but still getting the same issue. Tried to reinstall the widgets now getting these warnings, widgets still not working.

Hi @kailash99,

Could you add import '@builder.io/widgets'; to the file which is located at src → components → builder.tsx

Additionally, the errors in the screenshot seem to be because of the react version dependency, therefore, running below command may help resolve the issue

npm install --legacy-peer-deps